diff --git a/config/deploy.template-cn.yaml b/config/deploy.template-cn.yaml index 4f8319f7c..55cf0088b 100644 --- a/config/deploy.template-cn.yaml +++ b/config/deploy.template-cn.yaml @@ -1,8 +1,7 @@ Deploy: Git: # URL of AzurLaneAutoScript repository - # [CN user] Use 'https://e.coding.net/llop18870/alas/AzurLaneAutoScript.git' for faster and more stable download - # [Other] Use 'https://github.com/LmeSzinc/AzurLaneAutoScript' + # [Other] Use 'https://github.com/LmeSzinc/StarRailCopilot' Repository: https://e.coding.net/llop18870/alas/AzurLaneAutoScript.git # Branch of Alas # [Developer] Use 'dev', 'app', etc, to try new features diff --git a/config/deploy.template.yaml b/config/deploy.template.yaml index 55973d6a7..fd2d919ff 100644 --- a/config/deploy.template.yaml +++ b/config/deploy.template.yaml @@ -1,9 +1,8 @@ Deploy: Git: # URL of AzurLaneAutoScript repository - # [CN user] Use 'https://e.coding.net/llop18870/alas/AzurLaneAutoScript.git' for faster and more stable download - # [Other] Use 'https://github.com/LmeSzinc/AzurLaneAutoScript' - Repository: https://github.com/LmeSzinc/AzurLaneAutoScript + # [Other] Use 'https://github.com/LmeSzinc/StarRailCopilot' + Repository: https://github.com/LmeSzinc/StarRailCopilot # Branch of Alas # [Developer] Use 'dev', 'app', etc, to try new features # [Other] Use 'master', the stable branch diff --git a/config/template.json b/config/template.json index 789766691..c0a167d83 100644 --- a/config/template.json +++ b/config/template.json @@ -5,7 +5,6 @@ "PackageName": "auto", "ScreenshotMethod": "scrcpy", "ControlMethod": "MaaTouch", - "ScreenshotDedithering": false, "AdbRestart": false }, "EmulatorInfo": { @@ -20,9 +19,8 @@ "OnePushConfig": "provider: null" }, "Optimization": { - "ScreenshotInterval": 0.3, + "ScreenshotInterval": 0.2, "CombatScreenshotInterval": 1.0, - "TaskHoardingDuration": 0, "WhenTaskQueueEmpty": "goto_main" }, "Storage": { diff --git a/deploy/Windows/config.py b/deploy/Windows/config.py index 83e33884c..6fbe65299 100644 --- a/deploy/Windows/config.py +++ b/deploy/Windows/config.py @@ -54,7 +54,7 @@ class ConfigModel: # Webui WebuiHost: str = "0.0.0.0" - WebuiPort: int = 22267 + WebuiPort: int = 22367 Language: str = "en-US" Theme: str = "default" DpiScaling: bool = True diff --git a/deploy/Windows/template.yaml b/deploy/Windows/template.yaml index 95186ac69..df53770a0 100644 --- a/deploy/Windows/template.yaml +++ b/deploy/Windows/template.yaml @@ -1,9 +1,8 @@ Deploy: Git: # URL of AzurLaneAutoScript repository - # [CN user] Use 'https://e.coding.net/llop18870/alas/AzurLaneAutoScript.git' for faster and more stable download - # [Other] Use 'https://github.com/LmeSzinc/AzurLaneAutoScript' - Repository: 'https://github.com/LmeSzinc/AzurLaneAutoScript' + # [Other] Use 'https://github.com/LmeSzinc/StarRailCopilot' + Repository: 'https://github.com/LmeSzinc/StarRailCopilot' # Branch of Alas # [Developer] Use 'dev', 'app', etc, to try new features # [Other] Use 'master', the stable branch diff --git a/gui.py b/gui.py index 97b5f3cf4..7a2931a7d 100644 --- a/gui.py +++ b/gui.py @@ -49,7 +49,7 @@ def func(ev: threading.Event): args, _ = parser.parse_known_args() host = args.host or State.deploy_config.WebuiHost or "0.0.0.0" - port = args.port or int(State.deploy_config.WebuiPort) or 22267 + port = args.port or int(State.deploy_config.WebuiPort) or 22367 State.electron = args.electron logger.hr("Launcher config") diff --git a/module/config/argument/args.json b/module/config/argument/args.json index 37c7780c3..0c1f753db 100644 --- a/module/config/argument/args.json +++ b/module/config/argument/args.json @@ -41,10 +41,6 @@ ], "display": "hide" }, - "ScreenshotDedithering": { - "type": "checkbox", - "value": false - }, "AdbRestart": { "type": "checkbox", "value": false @@ -106,15 +102,13 @@ "Optimization": { "ScreenshotInterval": { "type": "input", - "value": 0.3 + "value": 0.2, + "display": "hide" }, "CombatScreenshotInterval": { "type": "input", - "value": 1.0 - }, - "TaskHoardingDuration": { - "type": "input", - "value": 0 + "value": 1.0, + "display": "hide" }, "WhenTaskQueueEmpty": { "type": "select", diff --git a/module/config/argument/argument.yaml b/module/config/argument/argument.yaml index 381df3191..94bfb823e 100644 --- a/module/config/argument/argument.yaml +++ b/module/config/argument/argument.yaml @@ -24,7 +24,6 @@ Emulator: ControlMethod: value: MaaTouch option: [ minitouch, MaaTouch ] - ScreenshotDedithering: false AdbRestart: false EmulatorInfo: Emulator: @@ -64,7 +63,6 @@ Error: Optimization: ScreenshotInterval: 0.3 CombatScreenshotInterval: 1.0 - TaskHoardingDuration: 0 WhenTaskQueueEmpty: value: goto_main option: [ stay_there, goto_main, close_game ] diff --git a/module/config/argument/override.yaml b/module/config/argument/override.yaml index e734815a9..946a997d2 100644 --- a/module/config/argument/override.yaml +++ b/module/config/argument/override.yaml @@ -9,6 +9,9 @@ Alas: Emulator: ScreenshotMethod: scrcpy ControlMethod: MaaTouch + Optimization: + ScreenshotInterval: 0.2 + CombatScreenshotInterval: 1.0 Restart: Scheduler: Enable: diff --git a/module/config/config_generated.py b/module/config/config_generated.py index 78e55c763..84eb3586c 100644 --- a/module/config/config_generated.py +++ b/module/config/config_generated.py @@ -20,7 +20,6 @@ class GeneratedConfig: Emulator_PackageName = 'auto' # auto, com.miHoYo.hkrpg, com.HoYoverse.hkrpgoversea, com.miHoYo.hkrpg.bilibili Emulator_ScreenshotMethod = 'auto' # auto, ADB, ADB_nc, uiautomator2, aScreenCap, aScreenCap_nc, DroidCast, DroidCast_raw, scrcpy Emulator_ControlMethod = 'MaaTouch' # minitouch, MaaTouch - Emulator_ScreenshotDedithering = False Emulator_AdbRestart = False # Group `EmulatorInfo` @@ -37,7 +36,6 @@ class GeneratedConfig: # Group `Optimization` Optimization_ScreenshotInterval = 0.3 Optimization_CombatScreenshotInterval = 1.0 - Optimization_TaskHoardingDuration = 0 Optimization_WhenTaskQueueEmpty = 'goto_main' # stay_there, goto_main, close_game # Group `Storage` diff --git a/module/config/i18n/en-US.json b/module/config/i18n/en-US.json index c5663d540..0218ae5aa 100644 --- a/module/config/i18n/en-US.json +++ b/module/config/i18n/en-US.json @@ -77,10 +77,6 @@ "minitouch": "minitouch", "MaaTouch": "MaaTouch" }, - "ScreenshotDedithering": { - "name": "Image Color De-dithering", - "help": "Enable when running Alas on phones" - }, "AdbRestart": { "name": "Try to restart adb when no device found", "help": "" @@ -155,10 +151,6 @@ "name": "Take Screenshots Every X Second(s) In Combat", "help": "Minimum interval between 2 screenshots, limited in 0.1 ~ 1.0, can help reduce CPU during battle" }, - "TaskHoardingDuration": { - "name": "Hoard Tasks For X Minute(s)", - "help": "By purposely not adding ready tasks to pending, allows for larger subsets to be built and run en masse at a later time\nCan reduce the frequency of operating AL" - }, "WhenTaskQueueEmpty": { "name": "When Task Queue is Empty", "help": "Close AL when there are no pending tasks, can help reduce CPU", diff --git a/module/config/i18n/ja-JP.json b/module/config/i18n/ja-JP.json index 0ccb2191f..23283ca56 100644 --- a/module/config/i18n/ja-JP.json +++ b/module/config/i18n/ja-JP.json @@ -77,10 +77,6 @@ "minitouch": "minitouch", "MaaTouch": "MaaTouch" }, - "ScreenshotDedithering": { - "name": "Emulator.ScreenshotDedithering.name", - "help": "Emulator.ScreenshotDedithering.help" - }, "AdbRestart": { "name": "Emulator.AdbRestart.name", "help": "Emulator.AdbRestart.help" @@ -155,10 +151,6 @@ "name": "Optimization.CombatScreenshotInterval.name", "help": "Optimization.CombatScreenshotInterval.help" }, - "TaskHoardingDuration": { - "name": "Optimization.TaskHoardingDuration.name", - "help": "Optimization.TaskHoardingDuration.help" - }, "WhenTaskQueueEmpty": { "name": "Optimization.WhenTaskQueueEmpty.name", "help": "Optimization.WhenTaskQueueEmpty.help", diff --git a/module/config/i18n/zh-CN.json b/module/config/i18n/zh-CN.json index 0d3919468..4eecde3fa 100644 --- a/module/config/i18n/zh-CN.json +++ b/module/config/i18n/zh-CN.json @@ -77,10 +77,6 @@ "minitouch": "minitouch", "MaaTouch": "MaaTouch" }, - "ScreenshotDedithering": { - "name": "去除图片色彩抖动", - "help": "在手机上运行时开启" - }, "AdbRestart": { "name": "在检测不到设备的时候尝试重启adb", "help": "" @@ -155,10 +151,6 @@ "name": "战斗中放慢截图速度至 X 秒一张", "help": "执行两次截图之间的最小间隔,限制在 0.1 ~ 1.0,能降低战斗时的 CPU 占用" }, - "TaskHoardingDuration": { - "name": "囤积任务 X 分钟", - "help": "能在收菜期间降低操作游戏的频率\n任务触发后,等待 X 分钟,再一次性执行囤积的任务" - }, "WhenTaskQueueEmpty": { "name": "当任务队列清空后", "help": "无任务时关闭游戏,能在收菜期间降低 CPU 占用", diff --git a/module/config/i18n/zh-TW.json b/module/config/i18n/zh-TW.json index ae1b27588..a03b9bac8 100644 --- a/module/config/i18n/zh-TW.json +++ b/module/config/i18n/zh-TW.json @@ -77,10 +77,6 @@ "minitouch": "minitouch", "MaaTouch": "MaaTouch" }, - "ScreenshotDedithering": { - "name": "去除圖片色彩抖動", - "help": "在手機上運行時開啟" - }, "AdbRestart": { "name": "在檢測不到設備的時候嘗試重啟adb", "help": "" @@ -155,10 +151,6 @@ "name": "戰鬥中放慢截圖速度至 X 秒一張", "help": "執行兩次截圖之間的最小間隔,限制在 0.1 ~ 1.0,能降低戰鬥時的 CPU 佔用" }, - "TaskHoardingDuration": { - "name": "囤積任務 X 分鐘", - "help": "能在收穫期間降低操作遊戲的頻率\n任務觸發後,等待 X 分鐘後,一次性執行佇列中的任務" - }, "WhenTaskQueueEmpty": { "name": "當任務隊列清空後", "help": "無任務時關閉遊戲,能在收菜期間降低 CPU 佔用", diff --git a/module/device/screenshot.py b/module/device/screenshot.py index a31bb5bc7..c054bcc7c 100644 --- a/module/device/screenshot.py +++ b/module/device/screenshot.py @@ -55,9 +55,9 @@ class Screenshot(Adb, WSA, DroidCast, AScreenCap, Scrcpy): ) self.image = method() - if self.config.Emulator_ScreenshotDedithering: - # This will take 40-60ms - cv2.fastNlMeansDenoising(self.image, self.image, h=17, templateWindowSize=1, searchWindowSize=2) + # if self.config.Emulator_ScreenshotDedithering: + # # This will take 40-60ms + # cv2.fastNlMeansDenoising(self.image, self.image, h=17, templateWindowSize=1, searchWindowSize=2) self.image = self._handle_orientated_image(self.image) if self.config.Error_SaveError: diff --git a/module/webui/remote_access.py b/module/webui/remote_access.py index 1dd45b65f..163cbd18c 100644 --- a/module/webui/remote_access.py +++ b/module/webui/remote_access.py @@ -41,7 +41,7 @@ def am_i_the_only_thread() -> bool: def remote_access_service( local_host="127.0.0.1", - local_port=22267, + local_port=22367, server="app.pywebio.online", server_port=1022, remote_port="/",