From f2dff103a87afee6fb668a63eea1b5d0dbfafcbf Mon Sep 17 00:00:00 2001 From: LemonNexus Date: Wed, 11 Feb 2026 15:39:36 +0000 Subject: [PATCH] fix: add actual game cache path and search subfolders for icons - Added: C:\ProgramData\Entropia Universe\public_users_data\cache\icon - Now searches version subfolders (e.g., 19.3.2.201024) - Also searches ProgramData recursively as fallback --- modules/tga_converter.py | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/modules/tga_converter.py b/modules/tga_converter.py index 6bc88aa..8753099 100644 --- a/modules/tga_converter.py +++ b/modules/tga_converter.py @@ -54,7 +54,9 @@ class TGAConverter: DEFAULT_CACHE_PATHS = [ Path.home() / "Documents" / "Entropia Universe" / "cache" / "icons", Path.home() / "Documents" / "Entropia Universe" / "cache", + Path("C:") / "ProgramData" / "Entropia Universe" / "public_users_data" / "cache" / "icon", Path("C:") / "ProgramData" / "Entropia Universe" / "cache" / "icons", + Path("C:") / "ProgramData" / "Entropia Universe" / "cache", Path("C:") / "Program Files (x86)" / "Entropia Universe" / "cache" / "icons", ] @@ -87,9 +89,17 @@ class TGAConverter: # Check default locations for path in self.DEFAULT_CACHE_PATHS: if path.exists(): - logger.info(f"Found cache folder: {path}") - self._cache_path = path - return path + # Check if this folder directly contains .tga files + if list(path.glob("*.tga")): + logger.info(f"Found cache folder: {path}") + self._cache_path = path + return path + # Check for subfolders (version folders like "19.3.2.201024") + for subfolder in path.iterdir(): + if subfolder.is_dir() and list(subfolder.glob("*.tga")): + logger.info(f"Found cache subfolder: {subfolder}") + self._cache_path = subfolder + return subfolder # Try to find by looking for .tga files logger.info("Searching for .tga files...") @@ -101,6 +111,15 @@ class TGAConverter: self._cache_path = cache_path return cache_path + # Also search in ProgramData + program_data = Path("C:") / "ProgramData" / "Entropia Universe" + if program_data.exists(): + for tga_file in program_data.rglob("*.tga"): + cache_path = tga_file.parent + logger.info(f"Found cache folder via search: {cache_path}") + self._cache_path = cache_path + return cache_path + logger.warning("Could not find Entropia Universe cache folder") return None