mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-03 11:18:26 +02:00
fixed an issue where the custom tracks were no longer copied to the game
This commit is contained in:
parent
9b07400a3e
commit
1372a0eac2
2 changed files with 13 additions and 3 deletions
|
@ -108,14 +108,19 @@ class ExtractedGame:
|
||||||
szs.create(extracted_szs, extracted_szs.with_suffix(".szs"), overwrite=True)
|
szs.create(extracted_szs, extracted_szs.with_suffix(".szs"), overwrite=True)
|
||||||
shutil.rmtree(str(extracted_szs.resolve()))
|
shutil.rmtree(str(extracted_szs.resolve()))
|
||||||
|
|
||||||
def patch_lecode(self, mod_config: ModConfig, cache_directory: Path | str) -> Generator[dict, None, None]:
|
def patch_lecode(self, mod_config: ModConfig, cache_directory: Path | str,
|
||||||
|
cttracks_directory: Path | str, ogtracks_directory: Path | str) -> Generator[dict, None, None]:
|
||||||
"""
|
"""
|
||||||
install lecode on the mod
|
install lecode on the mod
|
||||||
|
:param cttracks_directory: directory to the customs tracks
|
||||||
|
:param ogtracks_directory: directory to the originals tracks
|
||||||
:param cache_directory: Path to the cache
|
:param cache_directory: Path to the cache
|
||||||
:param mod_config: mod configuration
|
:param mod_config: mod configuration
|
||||||
"""
|
"""
|
||||||
yield {"description": "Patching LECODE.bin"}
|
yield {"description": "Patching LECODE.bin"}
|
||||||
cache_directory = Path(cache_directory)
|
cache_directory = Path(cache_directory)
|
||||||
|
cttracks_directory = Path(cttracks_directory)
|
||||||
|
ogtracks_directory = Path(ogtracks_directory)
|
||||||
|
|
||||||
# write ctfile data to a file in the cache
|
# write ctfile data to a file in the cache
|
||||||
ct_file = (cache_directory / "ctfile.lpar")
|
ct_file = (cache_directory / "ctfile.lpar")
|
||||||
|
@ -131,7 +136,7 @@ class ExtractedGame:
|
||||||
ct_file=ct_file,
|
ct_file=ct_file,
|
||||||
lpar=lpar,
|
lpar=lpar,
|
||||||
game_tracks_directory=self.path / "files/Race/Course/",
|
game_tracks_directory=self.path / "files/Race/Course/",
|
||||||
copy_tracks_directories=[cache_directory / "original-tracks/", cache_directory / "custom-tracks/"]
|
copy_tracks_directories=[ogtracks_directory, cttracks_directory]
|
||||||
)
|
)
|
||||||
|
|
||||||
def install_all_patch(self, mod_config: ModConfig) -> Generator[dict, None, None]:
|
def install_all_patch(self, mod_config: ModConfig) -> Generator[dict, None, None]:
|
||||||
|
|
|
@ -132,5 +132,10 @@ class Game:
|
||||||
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)
|
||||||
yield from extracted_game.recreate_all_szs()
|
yield from extracted_game.recreate_all_szs()
|
||||||
yield from extracted_game.patch_lecode(mod_config, cache_directory)
|
yield from extracted_game.patch_lecode(
|
||||||
|
mod_config,
|
||||||
|
cache_directory,
|
||||||
|
cache_cttracks_directory,
|
||||||
|
cache_ogtracks_directory,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue