Skip to content

Commit

Permalink
HACK: Make patcher work with Ultimate Collection
Browse files Browse the repository at this point in the history
  • Loading branch information
lah7 committed Jun 14, 2024
1 parent ce43dd4 commit ee6836e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions gamefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def get_game_name(self, file_path) -> str:
Identify the game name by going up a directory until we find "filelist.txt",
the root of the game installation, and take the name from this directory.
"""
return "The Sims 2 Ultimate Collection"
path = os.path.realpath(file_path)
root_count = len(path.split(os.sep))
while root_count > 2:
Expand Down
4 changes: 2 additions & 2 deletions sims2_4k_ui_patcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ def get_all_patchable_files(self) -> list:
"""
files = []
for filename in ["ui.package", "FontStyle.ini", "CaSIEUI.data"]:
files += glob.glob(os.path.join(self.ea_games_dir, "*Sims 2*", "TSData") + f"/**/{filename}", recursive=True)
return sorted(files)
files += glob.glob(os.path.join(self.ea_games_dir, "*Sims 2*", f"**/**/TSData/**/{filename}"), recursive=True)
return sorted(list(set(files)))

def refresh_game_status(self):
"""
Expand Down

0 comments on commit ee6836e

Please sign in to comment.