From 7fba62aacb05b5c942ccff0f27ad2cef57359700 Mon Sep 17 00:00:00 2001 From: gudzpoz Date: Mon, 30 Oct 2023 13:34:47 +0800 Subject: [PATCH] feat: unpack more anniversary stories --- src/components/StoryList.vue | 1 + src/types/assets.ts | 5 ++++- unpack/.gitignore | 1 + unpack/src/gfunpack/chapters.py | 1 + unpack/src/gfunpack/manual_chapters.py | 10 ++++++++++ 5 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/components/StoryList.vue b/src/components/StoryList.vue index 84a02e6..b345597 100644 --- a/src/components/StoryList.vue +++ b/src/components/StoryList.vue @@ -67,6 +67,7 @@ const data: (MenuOption & TreeSelectOption)[] = [ generateChapterOption('anniversary', '周年庆'), generateChapterOption('anniversary6', '六周年周年庆'), generateChapterOption('anniversary5', '五周年周年庆'), + generateChapterOption('anniversary4', '四周年周年庆'), generateChapterOption('skin', '皮肤故事'), ]; diff --git a/src/types/assets.ts b/src/types/assets.ts index 13a9b1b..b06a05c 100644 --- a/src/types/assets.ts +++ b/src/types/assets.ts @@ -42,7 +42,10 @@ export function getUrlType(s: string): typeof MEDIA_TYPES[number] { return 'sprite'; } -export type ChapterType = 'main' | 'event' | 'colab' | 'bonding' | 'upgrading' | 'anniversary' | 'anniversary6' | 'anniversary5' | 'skin'; +export type ChapterType = ( + 'main' | 'event' | 'colab' | 'bonding' | 'upgrading' + | 'anniversary' | 'anniversary6' | 'anniversary5' | 'anniversary4' | 'skin' +); export type Story = { name: string; description: string; diff --git a/unpack/.gitignore b/unpack/.gitignore index f18d824..29f8188 100644 --- a/unpack/.gitignore +++ b/unpack/.gitignore @@ -169,6 +169,7 @@ images/ audio/ gf-resource-downloader/ GFLData/ +GirlsFrontlineData/ gf-data-ch/asset/avgtxt/anniversary5/ gf-data-ch/asset/avgtxt/anniversary6/ *.ipynb diff --git a/unpack/src/gfunpack/chapters.py b/unpack/src/gfunpack/chapters.py index 26d1ecc..e99414e 100644 --- a/unpack/src/gfunpack/chapters.py +++ b/unpack/src/gfunpack/chapters.py @@ -350,6 +350,7 @@ def categorize_stories(self): all_chapters['bonding'] = self._categorize_bonding_stories() all_chapters['upgrading'] = self._categorize_upgrading_stories() all_chapters['anniversary'] = self._categorize_anniversary() + all_chapters['anniversary4'] = self._categorize_anniversary('anniversary4') all_chapters['anniversary5'] = self._categorize_anniversary('anniversary5') all_chapters['anniversary6'] = self._categorize_anniversary('anniversary6') all_chapters['skin'] = self._categorize_skins() diff --git a/unpack/src/gfunpack/manual_chapters.py b/unpack/src/gfunpack/manual_chapters.py index dec5c39..0320d94 100644 --- a/unpack/src/gfunpack/manual_chapters.py +++ b/unpack/src/gfunpack/manual_chapters.py @@ -271,10 +271,20 @@ def get_block_list(): def get_extra_anniversary_stories(destination: pathlib.Path): directory = pathlib.Path('GFLData', 'ch', 'text', 'avgtxt', 'anniversary') + old_directory = pathlib.Path('GirlsFrontlineData', 'zh-CN', 'asset_textes', 'avgtxt', 'anniversary') if not pathlib.Path('GFLData').is_dir(): subprocess.run([ 'git', 'clone', 'https://github.com/randomqwerty/GFLData.git', ], stdout=subprocess.DEVNULL).check_returncode() + if not pathlib.Path('GirlsFrontlineData').is_dir(): + subprocess.run([ + 'git', 'clone', 'https://github.com/Dimbreath/GirlsFrontlineData.git', + ], stdout=subprocess.DEVNULL).check_returncode() + if not destination.joinpath('anniversary4').is_dir(): + subprocess.run([ + 'git', 'checkout', '41793e107cb4697de10ac5bf507f1909f1c47030', + ], cwd='GirlsFrontlineData').check_returncode() + shutil.copytree(old_directory, destination.joinpath('anniversary4')) if not destination.joinpath('anniversary5').is_dir(): subprocess.run([ 'git', 'checkout', '9d0dae0066ccf1bc9e32abf35401d5ef7eaf7746',