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
This commit is contained in:
LemonNexus 2026-02-11 15:39:36 +00:00
parent acca0d3491
commit f2dff103a8
1 changed files with 22 additions and 3 deletions

View File

@ -54,7 +54,9 @@ class TGAConverter:
DEFAULT_CACHE_PATHS = [ DEFAULT_CACHE_PATHS = [
Path.home() / "Documents" / "Entropia Universe" / "cache" / "icons", Path.home() / "Documents" / "Entropia Universe" / "cache" / "icons",
Path.home() / "Documents" / "Entropia Universe" / "cache", 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" / "icons",
Path("C:") / "ProgramData" / "Entropia Universe" / "cache",
Path("C:") / "Program Files (x86)" / "Entropia Universe" / "cache" / "icons", Path("C:") / "Program Files (x86)" / "Entropia Universe" / "cache" / "icons",
] ]
@ -87,9 +89,17 @@ class TGAConverter:
# Check default locations # Check default locations
for path in self.DEFAULT_CACHE_PATHS: for path in self.DEFAULT_CACHE_PATHS:
if path.exists(): if path.exists():
# Check if this folder directly contains .tga files
if list(path.glob("*.tga")):
logger.info(f"Found cache folder: {path}") logger.info(f"Found cache folder: {path}")
self._cache_path = path self._cache_path = path
return 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 # Try to find by looking for .tga files
logger.info("Searching for .tga files...") logger.info("Searching for .tga files...")
@ -101,6 +111,15 @@ class TGAConverter:
self._cache_path = cache_path self._cache_path = cache_path
return 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") logger.warning("Could not find Entropia Universe cache folder")
return None return None