Custom tracks are now cached in a folder with the mod name instead of all sharing the same directory

This commit is contained in:
Faraphel 2022-08-02 19:29:15 +02:00
parent e126a6b45b
commit 6b001709c5
2 changed files with 4 additions and 1 deletions

View file

@ -103,7 +103,7 @@ class Game:
cache_autoadd_directory = cache_directory / "autoadd/"
cache_ogtracks_directory = cache_directory / "original-tracks/"
cache_cttracks_directory = cache_directory / f"custom-tracks/"
cache_cttracks_directory = cache_directory / f"custom-tracks/{mod_config}/"
# get the directory where the game will be extracted
extracted_game = ExtractedGame(self.get_output_directory(dest, mod_config), self)

View file

@ -96,6 +96,9 @@ class ModConfig:
def __repr__(self):
return f"<ModConfig name={self.name} version={self.version}>"
def __str__(self):
return f"{self.name} {self.version}"
@classmethod
def from_dict(cls, path: Path | str, config_dict: dict, macros: dict, messages: dict) -> "ModConfig":
"""