mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-06 12:48:22 +02:00
original tracks are now moved to original-tracks in the .cache
This commit is contained in:
parent
8d0544a084
commit
63cbe06bf3
2 changed files with 17 additions and 1 deletions
|
@ -23,11 +23,21 @@ class ExtractedGame:
|
||||||
"""
|
"""
|
||||||
Extract all the autoadd files from the game to destination_path
|
Extract all the autoadd files from the game to destination_path
|
||||||
:param destination_path: directory where the autoadd files will be extracted
|
:param destination_path: directory where the autoadd files will be extracted
|
||||||
:return: directory where the autoadd files were extracted
|
|
||||||
"""
|
"""
|
||||||
yield {"description": "Extracting autoadd files...", "determinate": False}
|
yield {"description": "Extracting autoadd files...", "determinate": False}
|
||||||
szs.autoadd(self.path / "files/Race/Course/", destination_path)
|
szs.autoadd(self.path / "files/Race/Course/", destination_path)
|
||||||
|
|
||||||
|
def extract_original_tracks(self, destination_path: "Path | str") -> Generator[dict, None, None]:
|
||||||
|
"""
|
||||||
|
Move all the original tracks to the destination path
|
||||||
|
:param destination_path: destination of the track
|
||||||
|
"""
|
||||||
|
destination_path = Path(destination_path)
|
||||||
|
destination_path.mkdir(parents=True, exist_ok=True)
|
||||||
|
yield {"description": "Extracting original tracks...", "determinate": False}
|
||||||
|
for track_file in (self.path / "files/Race/Course/").glob("*.szs"):
|
||||||
|
track_file.rename(destination_path / track_file.name)
|
||||||
|
|
||||||
def install_mystuff(self) -> Generator[dict, None, None]:
|
def install_mystuff(self) -> Generator[dict, None, None]:
|
||||||
"""
|
"""
|
||||||
Install mystuff directory
|
Install mystuff directory
|
||||||
|
|
|
@ -104,8 +104,14 @@ class Game:
|
||||||
if not self.is_mkw(): raise NotMKWGameError(self.wit_path.path)
|
if not self.is_mkw(): raise NotMKWGameError(self.wit_path.path)
|
||||||
if not self.is_vanilla(): raise NotVanillaError(self.wit_path.path)
|
if not self.is_vanilla(): raise NotVanillaError(self.wit_path.path)
|
||||||
|
|
||||||
|
# extract the game
|
||||||
yield from self.extract(extracted_game.path)
|
yield from self.extract(extracted_game.path)
|
||||||
|
|
||||||
|
# prepare the cache
|
||||||
yield from extracted_game.extract_autoadd(cache_directory / "autoadd/")
|
yield from extracted_game.extract_autoadd(cache_directory / "autoadd/")
|
||||||
|
yield from extracted_game.extract_original_tracks(cache_directory / "original-tracks/")
|
||||||
|
|
||||||
|
# patch the game
|
||||||
yield from extracted_game.install_mystuff()
|
yield from extracted_game.install_mystuff()
|
||||||
yield from extracted_game.prepare_dol()
|
yield from extracted_game.prepare_dol()
|
||||||
yield from extracted_game.install_all_patch(mod_config)
|
yield from extracted_game.install_all_patch(mod_config)
|
||||||
|
|
Loading…
Reference in a new issue