add the name of the actual mod version at in the ROM name

This commit is contained in:
raphael60650 2021-11-20 18:17:59 +01:00
parent 0ff1d946b9
commit 8f525cbe5f

View file

@ -108,7 +108,7 @@ class Game:
:param format: game format (ISO, WBFS, ...) :param format: game format (ISO, WBFS, ...)
""" """
if format in ["ISO", "WBFS", "CISO"]: if format in ["ISO", "WBFS", "CISO"]:
path_game_format: str = os.path.realpath(self.path + "/../MKWFaraphel." + format.lower()) path_game_format: str = os.path.realpath(self.path + f"/../MKWFaraphel v{self.ctconfig.version}." + format.lower())
wit.copy(src_path=self.path, dst_path=path_game_format, format=format) wit.copy(src_path=self.path, dst_path=path_game_format, format=format)
shutil.rmtree(self.path) shutil.rmtree(self.path)
self.path = path_game_format self.path = path_game_format
@ -125,11 +125,10 @@ class Game:
elif self.extension in ["ISO", "WBFS", "CSIO"]: elif self.extension in ["ISO", "WBFS", "CSIO"]:
# Fiding a directory name that doesn't already exist # Fiding a directory name that doesn't already exist
directory_name, i = "MKWiiFaraphel", 1 path_dir = get_next_available_dir(
while True: parent_dir=self.path + f"/../",
path_dir = os.path.realpath(self.path + f"/../{directory_name}") dir_name=f"MKWiiFaraphel v{self.ctconfig.version}"
if not (os.path.exists(path_dir)): break )
directory_name, i = f"MKWiiFaraphel ({i})", i + 1
wit.extract(file=self.path, dst_dir=path_dir) wit.extract(file=self.path, dst_dir=path_dir)