From bede639aa784ed51644e21e77f97fc3283318dea Mon Sep 17 00:00:00 2001 From: xhqss <112264454+xhqss@users.noreply.github.com> Date: Thu, 11 Apr 2024 22:37:27 +0800 Subject: [PATCH 1/5] Add: HOMO_STORAGE data for d2/d4 in Divergent Chessboard (#3622) --- campaign/Readme.md | 3 +++ config/deploy.template-AidLux-cn.yaml | 9 ++++--- config/deploy.template-AidLux.yaml | 11 ++++---- config/deploy.template-cn.yaml | 9 ++++--- config/deploy.template-docker-cn.yaml | 9 ++++--- config/deploy.template-docker.yaml | 11 ++++---- config/deploy.template-linux-cn.yaml | 9 ++++--- config/deploy.template-linux.yaml | 11 ++++---- config/deploy.template.yaml | 11 ++++---- module/config/argument/args.json | 12 ++++----- module/config/config_generated.py | 4 +-- module/config/i18n/en-US.json | 14 +++++----- module/config/i18n/ja-JP.json | 30 ++++++++++----------- module/config/i18n/zh-CN.json | 14 +++++----- module/config/i18n/zh-TW.json | 14 +++++----- webapp/packages/main/public/deploy.yaml.tpl | 9 ++++--- 16 files changed, 96 insertions(+), 84 deletions(-) diff --git a/campaign/Readme.md b/campaign/Readme.md index 318c74f10..3a2f5da98 100644 --- a/campaign/Readme.md +++ b/campaign/Readme.md @@ -190,4 +190,7 @@ To add a new event, add a new row in here, and run `python -m module.config.conf | 20240321 | raid 20230629 | Reflections of the Oasis | - | - | - | 綠洲往事 | | 20240328 | raid 20240328 | From Zero to Hero | 从零开始的魔王讨伐之旅 | From Zero to Hero | ゼロから頑張る魔王討伐 | - | | 20240403 | event 20211111 cn | The Flame-Touched Dagger | - | - | - | 復刻杰諾瓦的焰火 | +| 20240411 | event 20220224 cn | Abyssal Refrain Rerun | 复刻深度回音 | Abyssal Refrain Rerun | 鳴動せし星霜の淵(復刻) | - | +| 20240411 | event 20220224 cn | Abyssal Refrain Rerun | 复刻深度回音 | Abyssal Refrain Rerun | 鳴動せし星霜の淵(復刻) | - | +| 20240403 | event 20211111 cn | The Flame-Touched Dagger | - | - | - | 復刻杰諾瓦的焰火 | | 20240411 | event 20220224 cn | Abyssal Refrain Rerun | 复刻深度回音 | Abyssal Refrain Rerun | 鳴動せし星霜の淵(復刻) | - | \ No newline at end of file diff --git a/config/deploy.template-AidLux-cn.yaml b/config/deploy.template-AidLux-cn.yaml index 97fba4e43..fba862e3a 100644 --- a/config/deploy.template-AidLux-cn.yaml +++ b/config/deploy.template-AidLux-cn.yaml @@ -1,8 +1,8 @@ Deploy: Git: # URL of AzurLaneAutoScript repository - # [CN user] Use 'git://git.lyoko.io/AzurLaneAutoScript' for faster and more stable download - # [Other] Use 'https://github.com/LmeSzinc/AzurLaneAutoScript' + # [CN user] Use 'cn' to get update from git-over-cdn service + # [Other] Use 'global' to get update from https://github.com/LmeSzinc/StarRailCopilot Repository: git://git.lyoko.io/AzurLaneAutoScript # Branch of Alas # [Developer] Use 'dev', 'app', etc, to try new features @@ -128,13 +128,14 @@ Deploy: WebuiHost: 0.0.0.0 # --port. Port to listen # You will be able to access webui via `http://{host}:{port}` - # [In most cases] Default to 22267 - WebuiPort: 22267 + # [In most cases] Default to 22367 + WebuiPort: 22367 # Language to use on web ui # 'zh-CN' for Chinese simplified # 'en-US' for English # 'ja-JP' for Japanese # 'zh-TW' for Chinese traditional + # 'es-ES' for Spanish Language: zh-CN # Theme of web ui # 'default' for light theme diff --git a/config/deploy.template-AidLux.yaml b/config/deploy.template-AidLux.yaml index 19dcdff71..bededb590 100644 --- a/config/deploy.template-AidLux.yaml +++ b/config/deploy.template-AidLux.yaml @@ -1,9 +1,9 @@ Deploy: Git: # URL of AzurLaneAutoScript repository - # [CN user] Use 'git://git.lyoko.io/AzurLaneAutoScript' for faster and more stable download - # [Other] Use 'https://github.com/LmeSzinc/AzurLaneAutoScript' - Repository: https://github.com/LmeSzinc/AzurLaneAutoScript + # [CN user] Use 'cn' to get update from git-over-cdn service + # [Other] Use 'global' to get update from https://github.com/LmeSzinc/StarRailCopilot + Repository: global # Branch of Alas # [Developer] Use 'dev', 'app', etc, to try new features # [Other] Use 'master', the stable branch @@ -128,13 +128,14 @@ Deploy: WebuiHost: 0.0.0.0 # --port. Port to listen # You will be able to access webui via `http://{host}:{port}` - # [In most cases] Default to 22267 - WebuiPort: 22267 + # [In most cases] Default to 22367 + WebuiPort: 22367 # Language to use on web ui # 'zh-CN' for Chinese simplified # 'en-US' for English # 'ja-JP' for Japanese # 'zh-TW' for Chinese traditional + # 'es-ES' for Spanish Language: en-US # Theme of web ui # 'default' for light theme diff --git a/config/deploy.template-cn.yaml b/config/deploy.template-cn.yaml index 3800e347b..79c211ae8 100644 --- a/config/deploy.template-cn.yaml +++ b/config/deploy.template-cn.yaml @@ -1,8 +1,8 @@ Deploy: Git: # URL of AzurLaneAutoScript repository - # [CN user] Use 'git://git.lyoko.io/AzurLaneAutoScript' for faster and more stable download - # [Other] Use 'https://github.com/LmeSzinc/AzurLaneAutoScript' + # [CN user] Use 'cn' to get update from git-over-cdn service + # [Other] Use 'global' to get update from https://github.com/LmeSzinc/StarRailCopilot Repository: git://git.lyoko.io/AzurLaneAutoScript # Branch of Alas # [Developer] Use 'dev', 'app', etc, to try new features @@ -128,13 +128,14 @@ Deploy: WebuiHost: 0.0.0.0 # --port. Port to listen # You will be able to access webui via `http://{host}:{port}` - # [In most cases] Default to 22267 - WebuiPort: 22267 + # [In most cases] Default to 22367 + WebuiPort: 22367 # Language to use on web ui # 'zh-CN' for Chinese simplified # 'en-US' for English # 'ja-JP' for Japanese # 'zh-TW' for Chinese traditional + # 'es-ES' for Spanish Language: zh-CN # Theme of web ui # 'default' for light theme diff --git a/config/deploy.template-docker-cn.yaml b/config/deploy.template-docker-cn.yaml index d26fefdb2..02b4356cf 100644 --- a/config/deploy.template-docker-cn.yaml +++ b/config/deploy.template-docker-cn.yaml @@ -1,8 +1,8 @@ Deploy: Git: # URL of AzurLaneAutoScript repository - # [CN user] Use 'git://git.lyoko.io/AzurLaneAutoScript' for faster and more stable download - # [Other] Use 'https://github.com/LmeSzinc/AzurLaneAutoScript' + # [CN user] Use 'cn' to get update from git-over-cdn service + # [Other] Use 'global' to get update from https://github.com/LmeSzinc/StarRailCopilot Repository: git://git.lyoko.io/AzurLaneAutoScript # Branch of Alas # [Developer] Use 'dev', 'app', etc, to try new features @@ -128,13 +128,14 @@ Deploy: WebuiHost: 0.0.0.0 # --port. Port to listen # You will be able to access webui via `http://{host}:{port}` - # [In most cases] Default to 22267 - WebuiPort: 22267 + # [In most cases] Default to 22367 + WebuiPort: 22367 # Language to use on web ui # 'zh-CN' for Chinese simplified # 'en-US' for English # 'ja-JP' for Japanese # 'zh-TW' for Chinese traditional + # 'es-ES' for Spanish Language: zh-CN # Theme of web ui # 'default' for light theme diff --git a/config/deploy.template-docker.yaml b/config/deploy.template-docker.yaml index e2351ecd0..da5bfa140 100644 --- a/config/deploy.template-docker.yaml +++ b/config/deploy.template-docker.yaml @@ -1,9 +1,9 @@ Deploy: Git: # URL of AzurLaneAutoScript repository - # [CN user] Use 'git://git.lyoko.io/AzurLaneAutoScript' for faster and more stable download - # [Other] Use 'https://github.com/LmeSzinc/AzurLaneAutoScript' - Repository: https://github.com/LmeSzinc/AzurLaneAutoScript + # [CN user] Use 'cn' to get update from git-over-cdn service + # [Other] Use 'global' to get update from https://github.com/LmeSzinc/StarRailCopilot + Repository: global # Branch of Alas # [Developer] Use 'dev', 'app', etc, to try new features # [Other] Use 'master', the stable branch @@ -128,13 +128,14 @@ Deploy: WebuiHost: 0.0.0.0 # --port. Port to listen # You will be able to access webui via `http://{host}:{port}` - # [In most cases] Default to 22267 - WebuiPort: 22267 + # [In most cases] Default to 22367 + WebuiPort: 22367 # Language to use on web ui # 'zh-CN' for Chinese simplified # 'en-US' for English # 'ja-JP' for Japanese # 'zh-TW' for Chinese traditional + # 'es-ES' for Spanish Language: en-US # Theme of web ui # 'default' for light theme diff --git a/config/deploy.template-linux-cn.yaml b/config/deploy.template-linux-cn.yaml index a4ba3c04d..35f1aaf46 100644 --- a/config/deploy.template-linux-cn.yaml +++ b/config/deploy.template-linux-cn.yaml @@ -1,8 +1,8 @@ Deploy: Git: # URL of AzurLaneAutoScript repository - # [CN user] Use 'git://git.lyoko.io/AzurLaneAutoScript' for faster and more stable download - # [Other] Use 'https://github.com/LmeSzinc/AzurLaneAutoScript' + # [CN user] Use 'cn' to get update from git-over-cdn service + # [Other] Use 'global' to get update from https://github.com/LmeSzinc/StarRailCopilot Repository: git://git.lyoko.io/AzurLaneAutoScript # Branch of Alas # [Developer] Use 'dev', 'app', etc, to try new features @@ -128,13 +128,14 @@ Deploy: WebuiHost: 0.0.0.0 # --port. Port to listen # You will be able to access webui via `http://{host}:{port}` - # [In most cases] Default to 22267 - WebuiPort: 22267 + # [In most cases] Default to 22367 + WebuiPort: 22367 # Language to use on web ui # 'zh-CN' for Chinese simplified # 'en-US' for English # 'ja-JP' for Japanese # 'zh-TW' for Chinese traditional + # 'es-ES' for Spanish Language: zh-CN # Theme of web ui # 'default' for light theme diff --git a/config/deploy.template-linux.yaml b/config/deploy.template-linux.yaml index a256c2c50..9f32ea336 100644 --- a/config/deploy.template-linux.yaml +++ b/config/deploy.template-linux.yaml @@ -1,9 +1,9 @@ Deploy: Git: # URL of AzurLaneAutoScript repository - # [CN user] Use 'git://git.lyoko.io/AzurLaneAutoScript' for faster and more stable download - # [Other] Use 'https://github.com/LmeSzinc/AzurLaneAutoScript' - Repository: https://github.com/LmeSzinc/AzurLaneAutoScript + # [CN user] Use 'cn' to get update from git-over-cdn service + # [Other] Use 'global' to get update from https://github.com/LmeSzinc/StarRailCopilot + Repository: global # Branch of Alas # [Developer] Use 'dev', 'app', etc, to try new features # [Other] Use 'master', the stable branch @@ -128,13 +128,14 @@ Deploy: WebuiHost: 0.0.0.0 # --port. Port to listen # You will be able to access webui via `http://{host}:{port}` - # [In most cases] Default to 22267 - WebuiPort: 22267 + # [In most cases] Default to 22367 + WebuiPort: 22367 # Language to use on web ui # 'zh-CN' for Chinese simplified # 'en-US' for English # 'ja-JP' for Japanese # 'zh-TW' for Chinese traditional + # 'es-ES' for Spanish Language: en-US # Theme of web ui # 'default' for light theme diff --git a/config/deploy.template.yaml b/config/deploy.template.yaml index 3d60a0319..1c6adfcb4 100644 --- a/config/deploy.template.yaml +++ b/config/deploy.template.yaml @@ -1,9 +1,9 @@ Deploy: Git: # URL of AzurLaneAutoScript repository - # [CN user] Use 'git://git.lyoko.io/AzurLaneAutoScript' for faster and more stable download - # [Other] Use 'https://github.com/LmeSzinc/AzurLaneAutoScript' - Repository: https://github.com/LmeSzinc/AzurLaneAutoScript + # [CN user] Use 'cn' to get update from git-over-cdn service + # [Other] Use 'global' to get update from https://github.com/LmeSzinc/StarRailCopilot + Repository: global # Branch of Alas # [Developer] Use 'dev', 'app', etc, to try new features # [Other] Use 'master', the stable branch @@ -128,13 +128,14 @@ Deploy: WebuiHost: 0.0.0.0 # --port. Port to listen # You will be able to access webui via `http://{host}:{port}` - # [In most cases] Default to 22267 - WebuiPort: 22267 + # [In most cases] Default to 22367 + WebuiPort: 22367 # Language to use on web ui # 'zh-CN' for Chinese simplified # 'en-US' for English # 'ja-JP' for Japanese # 'zh-TW' for Chinese traditional + # 'es-ES' for Spanish Language: en-US # Theme of web ui # 'default' for light theme diff --git a/module/config/argument/args.json b/module/config/argument/args.json index f9aa2e192..689cb7f0b 100644 --- a/module/config/argument/args.json +++ b/module/config/argument/args.json @@ -3131,13 +3131,13 @@ "event_20240229_cn" ], "option_bold": [ - "event_20210422_cn", - "event_20220324_cn" + "event_20211111_cn", + "event_20220224_cn" ], - "cn": "event_20220324_cn", - "en": "event_20220324_cn", - "jp": "event_20220324_cn", - "tw": "event_20210422_cn" + "cn": "event_20220224_cn", + "en": "event_20220224_cn", + "jp": "event_20220224_cn", + "tw": "event_20211111_cn" }, "Mode": { "type": "select", diff --git a/module/config/config_generated.py b/module/config/config_generated.py index b0e2e7130..53966296f 100644 --- a/module/config/config_generated.py +++ b/module/config/config_generated.py @@ -149,12 +149,12 @@ class GeneratedConfig: # Group `GemsFarming` GemsFarming_ChangeFlagship = 'ship' # ship, ship_equip + GemsFarming_CommonCV = 'any' # any, langley, bogue, ranger, hermes GemsFarming_ChangeVanguard = 'ship' # disabled, ship, ship_equip + GemsFarming_CommonDD = 'any' # any, aulick_or_foote, cassin_or_downes GemsFarming_ALLowLowVanguardLevel = True GemsFarming_FleetNumberInHardMode = 0 # 0, 1, 2 GemsFarming_StopIFAutoNotEnsured = True - GemsFarming_CommonCV = 'any' # any, langley, bogue, ranger, hermes - GemsFarming_CommonDD = 'any' # any, aulick_or_foote, cassin_or_downes GemsFarming_CommissionLimit = True # Group `FlagshipFilter` diff --git a/module/config/i18n/en-US.json b/module/config/i18n/en-US.json index 92a76fead..9ee65a908 100644 --- a/module/config/i18n/en-US.json +++ b/module/config/i18n/en-US.json @@ -1158,6 +1158,13 @@ "ship": "Change Ship", "ship_equip": "Change Ship + Gears" }, + "CommonDD": { + "name": "Flagship Common DD Preference", + "help": "", + "any": "any", + "aulick_or_foote": "aulick or foote", + "cassin_or_downes": "cassin or downes" + }, "ALLowLowVanguardLevel": { "name": "ALLow Low Vanguard Level", "help": "Destroyers over level 10 will now be used, 49 for Event CD" @@ -1173,13 +1180,6 @@ "name": "GemsFarming.StopIFAutoNotEnsured.name", "help": "GemsFarming.StopIFAutoNotEnsured.help" }, - "CommonDD": { - "name": "Flagship Common DD Preference", - "help": "", - "any": "any", - "aulick_or_foote": "aulick or foote", - "cassin_or_downes": "cassin or downes" - }, "CommissionLimit": { "name": "Prevent Too Many Urgent Commissions", "help": "When running 7x24, prevent having a lot of urgent commissions and not being able to complete daily commissions. It is recommended to select only short-terms and high-yields in the commission filter" diff --git a/module/config/i18n/ja-JP.json b/module/config/i18n/ja-JP.json index de5e71311..c1f598955 100644 --- a/module/config/i18n/ja-JP.json +++ b/module/config/i18n/ja-JP.json @@ -1142,21 +1142,6 @@ "ship": "ship", "ship_equip": "ship_equip" }, - "ALLowLowVanguardLevel": { - "name": "GemsFarming.ALLowLowVanguardLevel.name", - "help": "GemsFarming.ALLowLowVanguardLevel.help" - }, - "FleetNumberInHardMode": { - "name": "GemsFarming.FleetNumberInHardMode.name", - "help": "GemsFarming.FleetNumberInHardMode.help", - "0": "0", - "1": "1", - "2": "2" - }, - "StopIFAutoNotEnsured": { - "name": "GemsFarming.StopIFAutoNotEnsured.name", - "help": "GemsFarming.StopIFAutoNotEnsured.help" - }, "CommonCV": { "name": "GemsFarming.CommonCV.name", "help": "GemsFarming.CommonCV.help", @@ -1180,6 +1165,21 @@ "aulick_or_foote": "aulick or foote", "cassin_or_downes": "cassin or downes" }, + "ALLowLowVanguardLevel": { + "name": "GemsFarming.ALLowLowVanguardLevel.name", + "help": "GemsFarming.ALLowLowVanguardLevel.help" + }, + "FleetNumberInHardMode": { + "name": "GemsFarming.FleetNumberInHardMode.name", + "help": "GemsFarming.FleetNumberInHardMode.help", + "0": "0", + "1": "1", + "2": "2" + }, + "StopIFAutoNotEnsured": { + "name": "GemsFarming.StopIFAutoNotEnsured.name", + "help": "GemsFarming.StopIFAutoNotEnsured.help" + }, "CommissionLimit": { "name": "GemsFarming.CommissionLimit.name", "help": "GemsFarming.CommissionLimit.help" diff --git a/module/config/i18n/zh-CN.json b/module/config/i18n/zh-CN.json index 4dc9537d7..55f179591 100644 --- a/module/config/i18n/zh-CN.json +++ b/module/config/i18n/zh-CN.json @@ -1158,6 +1158,13 @@ "ship": "更换舰船", "ship_equip": "更换舰船 + 装备" }, + "CommonDD": { + "name": "指定前排", + "help": "", + "any": "任意", + "aulick_or_foote": "奥利克或富特", + "cassin_or_downes": "卡辛或唐斯" + }, "ALLowLowVanguardLevel": { "name": "可更换低等级前排", "help": "倍率打开时,前排等级限制改为10以上即可。若为困难模式(如CD图)改为49级。" @@ -1173,13 +1180,6 @@ "name": "无法设置职能时停止任务", "help": "无法设置舰队职能时,以以下方式停止任务以免跨队队伍出击,石油被大量消耗:\n若设置了错误推送则推送任务停止的消息并停止该任务。\n若没有设置错误推送,则直接停止Alas。" }, - "CommonDD": { - "name": "指定前排", - "help": "", - "any": "任意", - "aulick_or_foote": "奥利克或富特", - "cassin_or_downes": "卡辛或唐斯" - }, "CommissionLimit": { "name": "防止紧急委托数量过多", "help": "在7x24运行时防止紧急委托数量过多做不完每日委托,建议在委托过滤器仅选择短时长高收益委托" diff --git a/module/config/i18n/zh-TW.json b/module/config/i18n/zh-TW.json index 26ae0111c..a58765efb 100644 --- a/module/config/i18n/zh-TW.json +++ b/module/config/i18n/zh-TW.json @@ -1158,6 +1158,13 @@ "ship": "更換艦船", "ship_equip": "更換艦船 + 裝備" }, + "CommonDD": { + "name": "指定前排", + "help": "", + "any": "任意", + "aulick_or_foote": "奧利克或富特", + "cassin_or_downes": "卡辛或唐斯" + }, "ALLowLowVanguardLevel": { "name": "可更換低等級前排", "help": "倍率打開時,前排等級限制改為10以上即可" @@ -1173,13 +1180,6 @@ "name": "GemsFarming.StopIFAutoNotEnsured.name", "help": "GemsFarming.StopIFAutoNotEnsured.help" }, - "CommonDD": { - "name": "指定前排", - "help": "", - "any": "任意", - "aulick_or_foote": "奧利克或富特", - "cassin_or_downes": "卡辛或唐斯" - }, "CommissionLimit": { "name": "防止緊急委託數量過多", "help": "在7x24運行時防止緊急委託數量過多做不完每日委託,建議在委託過濾器僅選擇短時長高收益委託" diff --git a/webapp/packages/main/public/deploy.yaml.tpl b/webapp/packages/main/public/deploy.yaml.tpl index 58732023f..8f0627f1b 100644 --- a/webapp/packages/main/public/deploy.yaml.tpl +++ b/webapp/packages/main/public/deploy.yaml.tpl @@ -1,8 +1,8 @@ Deploy: Git: # URL of AzurLaneAutoScript repository - # [CN user] Use 'git://git.lyoko.io/AzurLaneAutoScript' for faster and more stable download - # [Other] Use 'https://github.com/LmeSzinc/AzurLaneAutoScript' + # [CN user] Use 'cn' to get update from git-over-cdn service + # [Other] Use 'global' to get update from https://github.com/LmeSzinc/StarRailCopilot Repository: {{repository}} # Branch of Alas # [Developer] Use 'dev', 'app', etc, to try new features @@ -128,13 +128,14 @@ Deploy: WebuiHost: 0.0.0.0 # --port. Port to listen # You will be able to access webui via `http://{host}:{port}` - # [In most cases] Default to 22267 - WebuiPort: 22267 + # [In most cases] Default to 22367 + WebuiPort: 22367 # Language to use on web ui # 'zh-CN' for Chinese simplified # 'en-US' for English # 'ja-JP' for Japanese # 'zh-TW' for Chinese traditional + # 'es-ES' for Spanish Language: {{language}} # Theme of web ui # 'default' for light theme From 90c41ec7b4dad8c91b1dd4ec30f8c5266e6eea65 Mon Sep 17 00:00:00 2001 From: xhqss <112264454+xhqss@users.noreply.github.com> Date: Thu, 11 Apr 2024 22:51:10 +0800 Subject: [PATCH 2/5] Upd: config --- module/config/argument/args.json | 44 ++++++++++++++++---------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/module/config/argument/args.json b/module/config/argument/args.json index 689cb7f0b..d33005fdf 100644 --- a/module/config/argument/args.json +++ b/module/config/argument/args.json @@ -1902,8 +1902,8 @@ ], "display": "hide", "option_bold": [ - "event_20211111_cn", - "event_20220224_cn" + "event_20220224_cn", + "event_20211111_cn" ], "cn": "event_20220224_cn", "en": "event_20220224_cn", @@ -2235,8 +2235,8 @@ "event_20240229_cn" ], "option_bold": [ - "event_20211111_cn", - "event_20220224_cn" + "event_20220224_cn", + "event_20211111_cn" ], "cn": "event_20220224_cn", "en": "event_20220224_cn", @@ -2683,8 +2683,8 @@ "event_20240229_cn" ], "option_bold": [ - "event_20211111_cn", - "event_20220224_cn" + "event_20220224_cn", + "event_20211111_cn" ], "cn": "event_20220224_cn", "en": "event_20220224_cn", @@ -3131,8 +3131,8 @@ "event_20240229_cn" ], "option_bold": [ - "event_20211111_cn", - "event_20220224_cn" + "event_20220224_cn", + "event_20211111_cn" ], "cn": "event_20220224_cn", "en": "event_20220224_cn", @@ -3542,8 +3542,8 @@ "raid_20240328" ], "option_bold": [ - "raid_20230629", - "raid_20240328" + "raid_20240328", + "raid_20230629" ], "cn": "raid_20240328", "en": "raid_20240328", @@ -4525,8 +4525,8 @@ "event_20240229_cn" ], "option_bold": [ - "event_20211111_cn", - "event_20220224_cn" + "event_20220224_cn", + "event_20211111_cn" ], "cn": "event_20220224_cn", "en": "event_20220224_cn", @@ -4990,8 +4990,8 @@ "event_20240229_cn" ], "option_bold": [ - "event_20211111_cn", - "event_20220224_cn" + "event_20220224_cn", + "event_20211111_cn" ], "cn": "event_20220224_cn", "en": "event_20220224_cn", @@ -5455,8 +5455,8 @@ "event_20240229_cn" ], "option_bold": [ - "event_20211111_cn", - "event_20220224_cn" + "event_20220224_cn", + "event_20211111_cn" ], "cn": "event_20220224_cn", "en": "event_20220224_cn", @@ -5920,8 +5920,8 @@ "event_20240229_cn" ], "option_bold": [ - "event_20211111_cn", - "event_20220224_cn" + "event_20220224_cn", + "event_20211111_cn" ], "cn": "event_20220224_cn", "en": "event_20220224_cn", @@ -6375,8 +6375,8 @@ "event_20240229_cn" ], "option_bold": [ - "event_20211111_cn", - "event_20220224_cn" + "event_20220224_cn", + "event_20211111_cn" ], "cn": "event_20220224_cn", "en": "event_20220224_cn", @@ -6783,8 +6783,8 @@ "raid_20240328" ], "option_bold": [ - "raid_20230629", - "raid_20240328" + "raid_20240328", + "raid_20230629" ], "cn": "raid_20240328", "en": "raid_20240328", From cb1fe1812ffe2cc6f852aaded99c164338cb10b9 Mon Sep 17 00:00:00 2001 From: mulaikurisu <124201633+mulaikurisu@users.noreply.github.com> Date: Fri, 12 Apr 2024 01:51:55 +0800 Subject: [PATCH 3/5] Upd:change WebuiPort from 22367 to 22267 --- deploy/Windows/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/Windows/config.py b/deploy/Windows/config.py index adf91ee67..48b32e290 100644 --- a/deploy/Windows/config.py +++ b/deploy/Windows/config.py @@ -55,7 +55,7 @@ class ConfigModel: # Webui WebuiHost: str = "0.0.0.0" - WebuiPort: int = 22367 + WebuiPort: int = 22267 Language: str = "en-US" Theme: str = "default" DpiScaling: bool = True From 860bcf576097768d0290333c00a8f5cfcb229890 Mon Sep 17 00:00:00 2001 From: LA_DI_DA <11174151+0O0o0oOoO00@users.noreply.github.com> Date: Sun, 28 Apr 2024 22:19:09 +0800 Subject: [PATCH 4/5] Del: screenshot interval limit --- module/config/i18n/zh-CN.json | 4 ++-- module/device/screenshot.py | 21 +-------------------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/module/config/i18n/zh-CN.json b/module/config/i18n/zh-CN.json index 9287dfeaf..b159c311a 100644 --- a/module/config/i18n/zh-CN.json +++ b/module/config/i18n/zh-CN.json @@ -499,11 +499,11 @@ }, "ScreenshotInterval": { "name": "放慢截图速度至 X 秒一张", - "help": "执行两次截图之间的最小间隔,限制在 0.1 ~ 2.0,根据需要自行调整\n建议调整为较短的间隔,比如0.1s\n我也不知道为什么,但这似乎对于减少Alas的部分报错有一定的帮助 : )" + "help": "" }, "CombatScreenshotInterval": { "name": "战斗中放慢截图速度至 X 秒一张", - "help": "执行两次截图之间的最小间隔,限制在 0.1 ~ 5.0,根据需要自行调整\n建议调整为较短的间隔,比如0.5s\n我也不知道为什么,但这似乎对于减少Alas的部分报错有一定的帮助 : )" + "help": "" }, "TaskHoardingDuration": { "name": "囤积任务 X 分钟", diff --git a/module/device/screenshot.py b/module/device/screenshot.py index 6032dfa63..0c68b66f1 100644 --- a/module/device/screenshot.py +++ b/module/device/screenshot.py @@ -155,31 +155,12 @@ class Screenshot(Adb, WSA, DroidCast, AScreenCap, Scrcpy, NemuIpc): Minimum interval between 2 screenshots in seconds. Or None for Optimization_ScreenshotInterval, 'combat' for Optimization_CombatScreenshotInterval """ - if interval is None: - origin = self.config.Optimization_ScreenshotInterval - interval = limit_in(origin, 0.1, 2.0) - if interval != origin: - logger.warning(f'Optimization.ScreenshotInterval {origin} is revised to {interval}') - self.config.Optimization_ScreenshotInterval = interval - # Allow nemu_ipc to have a lower default - if self.config.Emulator_ScreenshotMethod == 'nemu_ipc': - interval = limit_in(origin, 0.1, 0.2) - elif interval == 'combat': - origin = self.config.Optimization_CombatScreenshotInterval - interval = limit_in(origin, 0.3, 5.0) - if interval != origin: - logger.warning(f'Optimization.CombatScreenshotInterval {origin} is revised to {interval}') - self.config.Optimization_CombatScreenshotInterval = interval - elif isinstance(interval, (int, float)): + if isinstance(interval, (int, float)): # No limitation for manual set in code pass else: logger.warning(f'Unknown screenshot interval: {interval}') raise ScriptError(f'Unknown screenshot interval: {interval}') - # Screenshot interval in scrcpy is meaningless, - # video stream is received continuously no matter you use it or not. - if self.config.Emulator_ScreenshotMethod == 'scrcpy': - interval = 0.1 if interval != self._screenshot_interval.limit: logger.info(f'Screenshot interval set to {interval}s') From 928b61978de11e5fe723ae743e0d5be67b3ee96e Mon Sep 17 00:00:00 2001 From: LA_DI_DA <11174151+0O0o0oOoO00@users.noreply.github.com> Date: Sun, 28 Apr 2024 23:06:32 +0800 Subject: [PATCH 5/5] Add: more setting for click record check --- config/template.json | 4 ++++ module/config/argument/args.json | 16 ++++++++++++++++ module/config/argument/argument.yaml | 4 ++++ module/config/config_generated.py | 4 ++++ module/config/i18n/en-US.json | 16 ++++++++++++++++ module/config/i18n/ja-JP.json | 16 ++++++++++++++++ module/config/i18n/zh-CN.json | 16 ++++++++++++++++ module/config/i18n/zh-TW.json | 16 ++++++++++++++++ module/device/device.py | 18 ++++++++++++++++-- 9 files changed, 108 insertions(+), 2 deletions(-) diff --git a/config/template.json b/config/template.json index 01bb92be5..1a9c42c6f 100644 --- a/config/template.json +++ b/config/template.json @@ -23,6 +23,10 @@ "Optimization": { "ScreenshotInterval": 0.3, "CombatScreenshotInterval": 1.0, + "ClickMaxRecord": 15, + "SingleButtonMaxCount": 12, + "MultiButtonMaxCount1": 6, + "MultiButtonMaxCount2": 6, "TaskHoardingDuration": 0, "WhenTaskQueueEmpty": "goto_main" }, diff --git a/module/config/argument/args.json b/module/config/argument/args.json index e07dbc2a2..8f0be1fda 100644 --- a/module/config/argument/args.json +++ b/module/config/argument/args.json @@ -198,6 +198,22 @@ "type": "input", "value": 1.0 }, + "ClickMaxRecord": { + "type": "input", + "value": 15 + }, + "SingleButtonMaxCount": { + "type": "input", + "value": 12 + }, + "MultiButtonMaxCount1": { + "type": "input", + "value": 6 + }, + "MultiButtonMaxCount2": { + "type": "input", + "value": 6 + }, "TaskHoardingDuration": { "type": "input", "value": 0 diff --git a/module/config/argument/argument.yaml b/module/config/argument/argument.yaml index 4e7d3262f..7ba098042 100644 --- a/module/config/argument/argument.yaml +++ b/module/config/argument/argument.yaml @@ -91,6 +91,10 @@ Error: Optimization: ScreenshotInterval: 0.3 CombatScreenshotInterval: 1.0 + ClickMaxRecord: 15 + SingleButtonMaxCount: 12 + MultiButtonMaxCount1: 6 + MultiButtonMaxCount2: 6 TaskHoardingDuration: 0 WhenTaskQueueEmpty: value: goto_main diff --git a/module/config/config_generated.py b/module/config/config_generated.py index 962210dbc..d2481a46e 100644 --- a/module/config/config_generated.py +++ b/module/config/config_generated.py @@ -40,6 +40,10 @@ class GeneratedConfig: # Group `Optimization` Optimization_ScreenshotInterval = 0.3 Optimization_CombatScreenshotInterval = 1.0 + Optimization_ClickMaxRecord = 15 + Optimization_SingleButtonMaxCount = 12 + Optimization_MultiButtonMaxCount1 = 6 + Optimization_MultiButtonMaxCount2 = 6 Optimization_TaskHoardingDuration = 0 Optimization_WhenTaskQueueEmpty = 'goto_main' # stay_there, goto_main, close_game diff --git a/module/config/i18n/en-US.json b/module/config/i18n/en-US.json index 92ca33742..682eb7450 100644 --- a/module/config/i18n/en-US.json +++ b/module/config/i18n/en-US.json @@ -505,6 +505,22 @@ "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" }, + "ClickMaxRecord": { + "name": "Optimization.ClickMaxRecord.name", + "help": "Optimization.ClickMaxRecord.help" + }, + "SingleButtonMaxCount": { + "name": "Optimization.SingleButtonMaxCount.name", + "help": "Optimization.SingleButtonMaxCount.help" + }, + "MultiButtonMaxCount1": { + "name": "Optimization.MultiButtonMaxCount1.name", + "help": "Optimization.MultiButtonMaxCount1.help" + }, + "MultiButtonMaxCount2": { + "name": "Optimization.MultiButtonMaxCount2.name", + "help": "Optimization.MultiButtonMaxCount2.help" + }, "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" diff --git a/module/config/i18n/ja-JP.json b/module/config/i18n/ja-JP.json index d547caf95..14f3ba990 100644 --- a/module/config/i18n/ja-JP.json +++ b/module/config/i18n/ja-JP.json @@ -505,6 +505,22 @@ "name": "Optimization.CombatScreenshotInterval.name", "help": "Optimization.CombatScreenshotInterval.help" }, + "ClickMaxRecord": { + "name": "Optimization.ClickMaxRecord.name", + "help": "Optimization.ClickMaxRecord.help" + }, + "SingleButtonMaxCount": { + "name": "Optimization.SingleButtonMaxCount.name", + "help": "Optimization.SingleButtonMaxCount.help" + }, + "MultiButtonMaxCount1": { + "name": "Optimization.MultiButtonMaxCount1.name", + "help": "Optimization.MultiButtonMaxCount1.help" + }, + "MultiButtonMaxCount2": { + "name": "Optimization.MultiButtonMaxCount2.name", + "help": "Optimization.MultiButtonMaxCount2.help" + }, "TaskHoardingDuration": { "name": "Optimization.TaskHoardingDuration.name", "help": "Optimization.TaskHoardingDuration.help" diff --git a/module/config/i18n/zh-CN.json b/module/config/i18n/zh-CN.json index b159c311a..eba6bc408 100644 --- a/module/config/i18n/zh-CN.json +++ b/module/config/i18n/zh-CN.json @@ -505,6 +505,22 @@ "name": "战斗中放慢截图速度至 X 秒一张", "help": "" }, + "ClickMaxRecord": { + "name": "最大点击记录量", + "help": "默认为15" + }, + "SingleButtonMaxCount": { + "name": "单Button最大计数", + "help": "该数值单项不得超过最大点击记录量,默认为12" + }, + "MultiButtonMaxCount1": { + "name": "多Button最大计数(Button1)", + "help": "该数值与下一项设置之和不得大于最大点击记录量,默认为6" + }, + "MultiButtonMaxCount2": { + "name": "多Button最大计数(Button2)", + "help": "该数值与上一项设置之和不得大于最大点击记录量,默认为6" + }, "TaskHoardingDuration": { "name": "囤积任务 X 分钟", "help": "能在收菜期间降低操作游戏的频率\n任务触发后,等待 X 分钟,再一次性执行囤积的任务" diff --git a/module/config/i18n/zh-TW.json b/module/config/i18n/zh-TW.json index ed2feba61..f85386a37 100644 --- a/module/config/i18n/zh-TW.json +++ b/module/config/i18n/zh-TW.json @@ -505,6 +505,22 @@ "name": "戰鬥中放慢截圖速度至 X 秒一張", "help": "執行兩次截圖之間的最小間隔,限制在 0.1 ~ 1.0,能降低戰鬥時的 CPU 佔用" }, + "ClickMaxRecord": { + "name": "Optimization.ClickMaxRecord.name", + "help": "Optimization.ClickMaxRecord.help" + }, + "SingleButtonMaxCount": { + "name": "Optimization.SingleButtonMaxCount.name", + "help": "Optimization.SingleButtonMaxCount.help" + }, + "MultiButtonMaxCount1": { + "name": "Optimization.MultiButtonMaxCount1.name", + "help": "Optimization.MultiButtonMaxCount1.help" + }, + "MultiButtonMaxCount2": { + "name": "Optimization.MultiButtonMaxCount2.name", + "help": "Optimization.MultiButtonMaxCount2.help" + }, "TaskHoardingDuration": { "name": "囤積任務 X 分鐘", "help": "能在收穫期間降低操作遊戲的頻率\n任務觸發後,等待 X 分鐘後,一次性執行佇列中的任務" diff --git a/module/device/device.py b/module/device/device.py index e745b55c9..e5b25a9c9 100644 --- a/module/device/device.py +++ b/module/device/device.py @@ -72,6 +72,10 @@ class Device(Screenshot, Control, AppControl): stuck_long_wait_list = ['BATTLE_STATUS_S', 'PAUSE', 'LOGIN_CHECK'] def __init__(self, *args, **kwargs): + record_maxlen = self.config.Optimization_ClickMaxRecord + if record_maxlen != self.click_record.maxlen: + self.click_record = collections.deque(maxlen=record_maxlen) + for _ in range(2): try: super().__init__(*args, **kwargs) @@ -263,19 +267,29 @@ class Device(Screenshot, Control, AppControl): return removed + def check_and_ensure_record_setting(self): + record_maxlen = self.config.Optimization_ClickMaxRecord + if self.config.Optimization_SingleButtonMaxCount > record_maxlen: + self.config.Optimization_SingleButtonMaxCount = int(0.8 * record_maxlen) + if self.config.Optimization_MultiButtonMaxCount1 + self.config.Optimization_MultiButtonMaxCount2 > record_maxlen: + self.config.Optimization_MultiButtonMaxCount1 = int(0.4 * record_maxlen) + self.config.Optimization_MultiButtonMaxCount2 = int(0.4 * record_maxlen) + def click_record_check(self): """ Raises: GameTooManyClickError: """ + self.check_and_ensure_record_setting() + count = collections.Counter(self.click_record).most_common(2) - if count[0][1] >= 12: + if count[0][1] >= self.config.Optimization_SingleButtonMaxCount: show_function_call() logger.warning(f'Too many click for a button: {count[0][0]}') logger.warning(f'History click: {[str(prev) for prev in self.click_record]}') self.click_record_clear() raise GameTooManyClickError(f'Too many click for a button: {count[0][0]}') - if len(count) >= 2 and count[0][1] >= 6 and count[1][1] >= 6: + if len(count) >= 2 and count[0][1] >= self.config.Optimization_MultiButtonMaxCount1 and count[1][1] >= self.config.Optimization_MultiButtonMaxCount2: show_function_call() logger.warning(f'Too many click between 2 buttons: {count[0][0]}, {count[1][0]}') logger.warning(f'History click: {[str(prev) for prev in self.click_record]}')