diff --git a/alas.py b/alas.py index 5fc6798c2..af60fe0b6 100644 --- a/alas.py +++ b/alas.py @@ -403,7 +403,10 @@ class AzurLaneAutoScript: def event_sp(self): from module.event.campaign_sp import CampaignSP CampaignSP(config=self.config, device=self.device).run() - + def event_story(self): + from module.eventstory.eventstory import EventStory + EventStory(config=self.config, device=self.device).run() + def maritime_escort(self): from module.event.maritime_escort import MaritimeEscort MaritimeEscort(config=self.config, device=self.device).run() diff --git a/config/deploy.template-AidLux-cn.yaml b/config/deploy.template-AidLux-cn.yaml index 5e400d27a..e2c008c77 100644 --- a/config/deploy.template-AidLux-cn.yaml +++ b/config/deploy.template-AidLux-cn.yaml @@ -84,6 +84,9 @@ Deploy: # Address of ocr server for alas instance to connect # [Default] 127.0.0.1:22268 OcrClientAddress: 127.0.0.1:22268 + # set the ocr server use which cpu + # [Default] 0,1 + OcrCpuAffinity: 0,1 Update: # Use auto update and builtin updater feature diff --git a/config/deploy.template-AidLux.yaml b/config/deploy.template-AidLux.yaml index 0b515705f..c835c79dd 100644 --- a/config/deploy.template-AidLux.yaml +++ b/config/deploy.template-AidLux.yaml @@ -84,6 +84,9 @@ Deploy: # Address of ocr server for alas instance to connect # [Default] 127.0.0.1:22268 OcrClientAddress: 127.0.0.1:22268 + # set the ocr server use which cpu + # [Default] 0,1 + OcrCpuAffinity: 0,1 Update: # Use auto update and builtin updater feature diff --git a/config/deploy.template-cn.yaml b/config/deploy.template-cn.yaml index 4d27dbf40..d5dd9f6f5 100644 --- a/config/deploy.template-cn.yaml +++ b/config/deploy.template-cn.yaml @@ -87,7 +87,7 @@ Deploy: # set the ocr server use which cpu # [Default] 0,1 OcrCpuAffinity: 0,1 - + Update: # Use auto update and builtin updater feature # This may cause problem https://github.com/LmeSzinc/AzurLaneAutoScript/issues/876 diff --git a/config/deploy.template-docker-cn.yaml b/config/deploy.template-docker-cn.yaml index 302c2a19e..b908c08ee 100644 --- a/config/deploy.template-docker-cn.yaml +++ b/config/deploy.template-docker-cn.yaml @@ -84,6 +84,9 @@ Deploy: # Address of ocr server for alas instance to connect # [Default] 127.0.0.1:22268 OcrClientAddress: 127.0.0.1:22268 + # set the ocr server use which cpu + # [Default] 0,1 + OcrCpuAffinity: 0,1 Update: # Use auto update and builtin updater feature diff --git a/config/deploy.template-docker.yaml b/config/deploy.template-docker.yaml index 7d8288ed2..1dc17fd10 100644 --- a/config/deploy.template-docker.yaml +++ b/config/deploy.template-docker.yaml @@ -84,6 +84,9 @@ Deploy: # Address of ocr server for alas instance to connect # [Default] 127.0.0.1:22268 OcrClientAddress: 127.0.0.1:22268 + # set the ocr server use which cpu + # [Default] 0,1 + OcrCpuAffinity: 0,1 Update: # Use auto update and builtin updater feature diff --git a/config/deploy.template-linux-cn.yaml b/config/deploy.template-linux-cn.yaml index eb32dee35..e80951314 100644 --- a/config/deploy.template-linux-cn.yaml +++ b/config/deploy.template-linux-cn.yaml @@ -84,6 +84,9 @@ Deploy: # Address of ocr server for alas instance to connect # [Default] 127.0.0.1:22268 OcrClientAddress: 127.0.0.1:22268 + # set the ocr server use which cpu + # [Default] 0,1 + OcrCpuAffinity: 0,1 Update: # Use auto update and builtin updater feature diff --git a/config/deploy.template-linux.yaml b/config/deploy.template-linux.yaml index c1656b478..9d4f3d22e 100644 --- a/config/deploy.template-linux.yaml +++ b/config/deploy.template-linux.yaml @@ -84,6 +84,9 @@ Deploy: # Address of ocr server for alas instance to connect # [Default] 127.0.0.1:22268 OcrClientAddress: 127.0.0.1:22268 + # set the ocr server use which cpu + # [Default] 0,1 + OcrCpuAffinity: 0,1 Update: # Use auto update and builtin updater feature diff --git a/config/deploy.template.yaml b/config/deploy.template.yaml index 2eb73e84c..e9d1ad535 100644 --- a/config/deploy.template.yaml +++ b/config/deploy.template.yaml @@ -87,7 +87,7 @@ Deploy: # set the ocr server use which cpu # [Default] 0,1 OcrCpuAffinity: 0,1 - + Update: # Use auto update and builtin updater feature # This may cause problem https://github.com/LmeSzinc/AzurLaneAutoScript/issues/876 diff --git a/config/template.json b/config/template.json index 8262748f4..b54c95ba6 100644 --- a/config/template.json +++ b/config/template.json @@ -1350,6 +1350,19 @@ "Storage": {} } }, + "EventStory": { + "Scheduler": { + "Enable": false, + "NextRun": "2020-01-01 00:00:00", + "Command": "EventStory", + "SuccessInterval": 0, + "FailureInterval": 120, + "ServerUpdate": "00:00" + }, + "Storage": { + "Storage": {} + } + }, "Commission": { "Scheduler": { "Enable": true, diff --git a/module/config/argument/args.json b/module/config/argument/args.json index 5f5403f24..09b64590b 100644 --- a/module/config/argument/args.json +++ b/module/config/argument/args.json @@ -3211,16 +3211,17 @@ "event_20240912_cn", "event_20241024_cn", "event_20241121_cn", - "event_20241219_cn" + "event_20241219_cn", + "event_20250227_cn" ], "option_bold": [ - "event_20221222_cn", - "event_20231221_cn" + "event_20240725_cn", + "event_20250227_cn" ], - "cn": "event_20221222_cn", - "en": "event_20221222_cn", - "jp": "event_20221222_cn", - "tw": "event_20231221_cn" + "cn": "event_20250227_cn", + "en": "event_20250227_cn", + "jp": "event_20250227_cn", + "tw": "event_20240725_cn" }, "Mode": { "type": "select", @@ -7419,6 +7420,51 @@ } } }, + "EventStory": { + "Scheduler": { + "Enable": { + "type": "checkbox", + "value": false, + "option": [ + true, + false + ] + }, + "NextRun": { + "type": "datetime", + "value": "2020-01-01 00:00:00", + "validate": "datetime" + }, + "Command": { + "type": "input", + "value": "EventStory", + "display": "hide" + }, + "SuccessInterval": { + "type": "input", + "value": 0, + "display": "hide" + }, + "FailureInterval": { + "type": "input", + "value": 120, + "display": "hide" + }, + "ServerUpdate": { + "type": "input", + "value": "00:00", + "display": "hide" + } + }, + "Storage": { + "Storage": { + "type": "storage", + "value": {}, + "valuetype": "ignore", + "display": "disabled" + } + } + }, "Commission": { "Scheduler": { "Enable": { diff --git a/module/config/argument/menu.json b/module/config/argument/menu.json index f270ca1aa..271cb5fd9 100644 --- a/module/config/argument/menu.json +++ b/module/config/argument/menu.json @@ -42,7 +42,8 @@ "EventD", "EventSp", "RaidDaily", - "CoalitionSp" + "CoalitionSp", + "EventStory" ] }, "Reward": { diff --git a/module/config/argument/task.yaml b/module/config/argument/task.yaml index d262cb918..a609dfc26 100644 --- a/module/config/argument/task.yaml +++ b/module/config/argument/task.yaml @@ -193,6 +193,8 @@ EventDaily: - Coalition - StopCondition - Emotion + EventStory: + - Scheduler # ==================== Reward ==================== diff --git a/module/config/config_manual.py b/module/config/config_manual.py index 84ccd481f..f37d3f6b0 100644 --- a/module/config/config_manual.py +++ b/module/config/config_manual.py @@ -18,7 +18,7 @@ class ManualConfig: > ShopFrequent > ShopOnce > Shipyard > Freebies > Daily > Hard > Oilkeep > Event > OpsiExplore - > Minigame > Awaken + > EventStory > Minigame > Awaken > OpsiAshBeacon > OpsiDaily > OpsiShop > OpsiVoucher > OpsiAbyssal > OpsiStronghold > OpsiObscure > OpsiArchive diff --git a/module/config/config_updater.py b/module/config/config_updater.py index 9b516890b..de24c5d5a 100644 --- a/module/config/config_updater.py +++ b/module/config/config_updater.py @@ -1,5 +1,5 @@ import sys -sys.path.append(r'C:/Users/W1NDes/Documents/GitHub/MAzurLaneAutoScript') +sys.path.append(r'C:/Users/W1NDes/Documents/GitHub/M-AzurLaneAutoScript') import re import typing as t from copy import deepcopy diff --git a/module/config/i18n/en-US.json b/module/config/i18n/en-US.json index b8f031195..2e3e50fd2 100644 --- a/module/config/i18n/en-US.json +++ b/module/config/i18n/en-US.json @@ -122,6 +122,10 @@ "name": "Little Academy SP", "help": "" }, + "EventStory": { + "name": "Task.EventStory.name", + "help": "Task.EventStory.help" + }, "Commission": { "name": "Commission", "help": "" diff --git a/module/config/i18n/ja-JP.json b/module/config/i18n/ja-JP.json index f0603e018..a635d9b17 100644 --- a/module/config/i18n/ja-JP.json +++ b/module/config/i18n/ja-JP.json @@ -122,6 +122,10 @@ "name": "Task.CoalitionSp.name", "help": "Task.CoalitionSp.help" }, + "EventStory": { + "name": "Task.EventStory.name", + "help": "Task.EventStory.help" + }, "Commission": { "name": "委託", "help": "" diff --git a/module/config/i18n/zh-CN.json b/module/config/i18n/zh-CN.json index 6e162a5cd..0cf533298 100644 --- a/module/config/i18n/zh-CN.json +++ b/module/config/i18n/zh-CN.json @@ -122,6 +122,10 @@ "name": "童心学院每日SP", "help": "" }, + "EventStory": { + "name": "活动剧情", + "help": "如果没有活动剧情,就不会运行,所以,勾上就行" + }, "Commission": { "name": "委托", "help": "" diff --git a/module/config/i18n/zh-TW.json b/module/config/i18n/zh-TW.json index fce07a3e3..aa0f98f72 100644 --- a/module/config/i18n/zh-TW.json +++ b/module/config/i18n/zh-TW.json @@ -122,6 +122,10 @@ "name": "極地風暴每日SP", "help": "" }, + "EventStory": { + "name": "Task.EventStory.name", + "help": "Task.EventStory.help" + }, "Commission": { "name": "委託", "help": "" diff --git a/module/eventstory/eventstory.py b/module/eventstory/eventstory.py index 10fcf5f6c..7cd5101e8 100644 --- a/module/eventstory/eventstory.py +++ b/module/eventstory/eventstory.py @@ -124,9 +124,11 @@ class EventStory(CampaignUI, Combat, LoginHandler): return 'unknown' def run(self): - self.run_event_story() + if 1==1: + self.run_event_story() # Scheduler + self.config.task_delay(server_update=True) pass