diff --git a/.github/workflows/res-update-game.yml b/.github/workflows/res-update-game.yml index 1663619270..19d0397b99 100644 --- a/.github/workflows/res-update-game.yml +++ b/.github/workflows/res-update-game.yml @@ -31,7 +31,9 @@ jobs: - name: Run Resource Updater run: | .\tools\ResourceUpdater\x64\Release\ResourceUpdater.exe - + - name: Overseas Tasks Ordering + run: | + python3 tools/ResourceUpdater/Tasks_Sorter.py - name: Check if only sorted id: check_only_sorted run: | diff --git a/resource/global/YoStarEN/resource/tasks.json b/resource/global/YoStarEN/resource/tasks.json index 9be1dcd151..53e896e782 100644 --- a/resource/global/YoStarEN/resource/tasks.json +++ b/resource/global/YoStarEN/resource/tasks.json @@ -1,13 +1,4 @@ { - "Award": { - "roi": [ - 700, - 530, - 200, - 130 - ], - "template": "Task.png" - }, "BattleQuickFormationExpandRole": { "roi": [ 1166, @@ -2582,13 +2573,12 @@ ] }, "ClickedCorrectStageOrSwipe": { - "action": "DoNothing", "baseTask": "StartButton1", + "action": "DoNothing", + "reduceOtherTimes": [], "next": [ "ClickedCorrectStage", "FullStageNavigation" - ], - "reduceOtherTimes": [ ] }, "CreditShop-NoMoney": { @@ -4203,6 +4193,10 @@ "Mantle of the Wrongly Condemned", "替罪领巾" ], + [ + "Support Replenishment", + "Support Replenishment Station" + ], [ "Support Replenishment Station", "支援补给站" @@ -5307,19 +5301,18 @@ ] }, "SSSDropRecruitmentOCR": { - "action": "DoNothing", - "algorithm": "OcrDetect", "baseTask": "CharsNameOcrReplace", + "algorithm": "OcrDetect", + "action": "DoNothing", + "text": [], "cache": false, - "postDelay": 1000, "roi": [ 0, 352, 1280, 263 ], - "text": [ - ] + "postDelay": 1000 }, "SSSEquipmentConfirm": { "roi": [ diff --git a/resource/global/YoStarKR/resource/tasks.json b/resource/global/YoStarKR/resource/tasks.json index 13e1408ea4..6ffc71ffa7 100644 --- a/resource/global/YoStarKR/resource/tasks.json +++ b/resource/global/YoStarKR/resource/tasks.json @@ -2746,11 +2746,6 @@ "구매센터" ] }, - "Mizuki@Roguelike@FromIntegratedStrategies": { - "text": [ - "테마진입" - ] - }, "Mizuki@Roguelike@NextLevel": { "text": [ "하늘빛해안", @@ -2792,11 +2787,6 @@ "인원" ] }, - "Phantom@Roguelike@FromIntegratedStrategies": { - "text": [ - "테마진입" - ] - }, "Phantom@Roguelike@NextLevel": { "text": [ "안개의기로", @@ -5367,7 +5357,8 @@ 352, 1280, 263 - ] + ], + "text": [] }, "SSSEquipmentConfirm": { "text": [ diff --git a/tools/ResourceUpdater/Tasks_Sorter.py b/tools/ResourceUpdater/Tasks_Sorter.py new file mode 100644 index 0000000000..99f9b8d7fa --- /dev/null +++ b/tools/ResourceUpdater/Tasks_Sorter.py @@ -0,0 +1,24 @@ +import json +from pathlib import Path +from collections import OrderedDict + +path = str(Path(__file__).parents[2]) + '/' + +servers = { + 'EN': 'YoStarEN', + 'JP': 'YoStarJP', + 'KR': 'YoStarKR', + 'TW': 'txwy' +} + +with open(path+'resource/tasks.json', 'r', encoding='UTF-8') as file: + order = list(json.load(file).keys()) + print('CN', len(order)) + +for server, name in servers.items(): + with open(path+f'resource/global/{name}/resource/tasks.json', 'r', encoding='UTF-8') as file: + tasks = json.load(file) + tasks = OrderedDict(sorted(tasks.items(), key=lambda item:order.index(item[0]) if item[0] in order else -1)) + with open(path+f'resource/global/{name}/resource/tasks.json', 'w', encoding='UTF-8') as file: + json.dump(tasks, file, indent=4, ensure_ascii=False) + print(server, len(tasks)) \ No newline at end of file