From 6b001709c596dc6c663ff7cf6f2fec684f31dc85 Mon Sep 17 00:00:00 2001 From: Faraphel Date: Tue, 2 Aug 2022 19:29:15 +0200 Subject: [PATCH] Custom tracks are now cached in a folder with the mod name instead of all sharing the same directory --- source/mkw/Game.py | 2 +- source/mkw/ModConfig.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/source/mkw/Game.py b/source/mkw/Game.py index 0564a24..f93f4c7 100644 --- a/source/mkw/Game.py +++ b/source/mkw/Game.py @@ -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) diff --git a/source/mkw/ModConfig.py b/source/mkw/ModConfig.py index 829b859..0b76e87 100644 --- a/source/mkw/ModConfig.py +++ b/source/mkw/ModConfig.py @@ -96,6 +96,9 @@ class ModConfig: def __repr__(self): return f"" + 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": """