Compare commits
4 Commits
99d6d2a578
...
0.2.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
86a187b08a
|
|||
|
594c506dc7
|
|||
|
30f3ab4ca5
|
|||
|
c26ca6ec02
|
+3
-2
@@ -370,8 +370,9 @@ class ProgressionTUI:
|
|||||||
|
|
||||||
def derive_workshop_path(self):
|
def derive_workshop_path(self):
|
||||||
"""Derive workshop path from RimWorld path"""
|
"""Derive workshop path from RimWorld path"""
|
||||||
if "steamapps" in self.rimworld_path.lower():
|
normalized_rimworld_path = os.path.normpath(self.rimworld_path)
|
||||||
parts = self.rimworld_path.split(os.sep)
|
if "steamapps" in normalized_rimworld_path.lower():
|
||||||
|
parts = normalized_rimworld_path.split(os.sep)
|
||||||
try:
|
try:
|
||||||
steamapps_index = next(i for i, part in enumerate(parts) if part.lower() == 'steamapps')
|
steamapps_index = next(i for i, part in enumerate(parts) if part.lower() == 'steamapps')
|
||||||
workshop_parts = parts[:steamapps_index + 1] + ['workshop', 'content', '294100']
|
workshop_parts = parts[:steamapps_index + 1] + ['workshop', 'content', '294100']
|
||||||
|
|||||||
+57
-33
@@ -843,15 +843,19 @@ class LoadingScreen:
|
|||||||
|
|
||||||
def extract_name_from_id(self, expansion_id):
|
def extract_name_from_id(self, expansion_id):
|
||||||
"""Extract expansion name from ID as fallback"""
|
"""Extract expansion name from ID as fallback"""
|
||||||
if 'royalty' in expansion_id.lower():
|
normalized_id = expansion_id.lower()
|
||||||
|
|
||||||
|
if normalized_id == 'ludeon.rimworld':
|
||||||
|
return 'Core'
|
||||||
|
elif 'royalty' in normalized_id:
|
||||||
return 'Royalty'
|
return 'Royalty'
|
||||||
elif 'ideology' in expansion_id.lower():
|
elif 'ideology' in normalized_id:
|
||||||
return 'Ideology'
|
return 'Ideology'
|
||||||
elif 'biotech' in expansion_id.lower():
|
elif 'biotech' in normalized_id:
|
||||||
return 'Biotech'
|
return 'Biotech'
|
||||||
elif 'anomaly' in expansion_id.lower():
|
elif 'anomaly' in normalized_id:
|
||||||
return 'Anomaly'
|
return 'Anomaly'
|
||||||
elif 'odyssey' in expansion_id.lower():
|
elif 'odyssey' in normalized_id:
|
||||||
return 'Odyssey'
|
return 'Odyssey'
|
||||||
else:
|
else:
|
||||||
# Extract the last part after the last dot and capitalize
|
# Extract the last part after the last dot and capitalize
|
||||||
@@ -2831,9 +2835,10 @@ class SteamWorkshopGUI:
|
|||||||
# From: D:\SteamLibrary\steamapps\common\RimWorld
|
# From: D:\SteamLibrary\steamapps\common\RimWorld
|
||||||
# To: D:\SteamLibrary\steamapps\workshop\content\294100
|
# To: D:\SteamLibrary\steamapps\workshop\content\294100
|
||||||
|
|
||||||
if "steamapps" in rimworld_path.lower():
|
normalized_rimworld_path = os.path.normpath(rimworld_path)
|
||||||
|
if "steamapps" in normalized_rimworld_path.lower():
|
||||||
# Find the steamapps part and replace common\RimWorld with workshop\content\294100
|
# Find the steamapps part and replace common\RimWorld with workshop\content\294100
|
||||||
parts = rimworld_path.split(os.sep)
|
parts = normalized_rimworld_path.split(os.sep)
|
||||||
try:
|
try:
|
||||||
steamapps_index = next(i for i, part in enumerate(parts) if part.lower() == 'steamapps')
|
steamapps_index = next(i for i, part in enumerate(parts) if part.lower() == 'steamapps')
|
||||||
# Build new path: everything up to steamapps + steamapps + workshop + content + 294100
|
# Build new path: everything up to steamapps + steamapps + workshop + content + 294100
|
||||||
@@ -3520,13 +3525,15 @@ class SteamWorkshopGUI:
|
|||||||
def get_core_mods_from_config(self):
|
def get_core_mods_from_config(self):
|
||||||
"""Get core mods from ModsConfig.xml knownExpansions section - includes ALL DLC the user owns"""
|
"""Get core mods from ModsConfig.xml knownExpansions section - includes ALL DLC the user owns"""
|
||||||
core_mods = []
|
core_mods = []
|
||||||
|
seen_core_mod_ids = set()
|
||||||
|
base_game_id = 'ludeon.rimworld'
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if not self.modsconfig_path or not os.path.exists(self.modsconfig_path):
|
if not self.modsconfig_path or not os.path.exists(self.modsconfig_path):
|
||||||
msg = "ModsConfig.xml not found, using default core mods\n"
|
msg = "ModsConfig.xml not found, using default core mods\n"
|
||||||
self._safe_update_output(msg)
|
self._safe_update_output(msg)
|
||||||
print(msg.strip())
|
print(msg.strip())
|
||||||
return [('ludeon.rimworld', 'RimWorld')]
|
return [(base_game_id, self.get_default_mod_name(base_game_id))]
|
||||||
|
|
||||||
msg = f"Reading ModsConfig.xml from: {self.modsconfig_path}\n"
|
msg = f"Reading ModsConfig.xml from: {self.modsconfig_path}\n"
|
||||||
self._safe_update_output(msg)
|
self._safe_update_output(msg)
|
||||||
@@ -3549,33 +3556,46 @@ class SteamWorkshopGUI:
|
|||||||
self._safe_update_output(msg)
|
self._safe_update_output(msg)
|
||||||
print(msg.strip())
|
print(msg.strip())
|
||||||
|
|
||||||
# Find knownExpansions section and include ALL expansions found
|
def add_core_mod(mod_id):
|
||||||
|
mod_id = (mod_id or "").strip()
|
||||||
|
if not mod_id or mod_id in seen_core_mod_ids:
|
||||||
|
return
|
||||||
|
|
||||||
|
mod_name = self.get_expansion_real_name(mod_id, rimworld_data_path)
|
||||||
|
msg = f"get_expansion_real_name returned: {mod_name}\n"
|
||||||
|
self._safe_update_output(msg)
|
||||||
|
print(msg.strip())
|
||||||
|
if not mod_name:
|
||||||
|
mod_name = self.get_default_mod_name(mod_id)
|
||||||
|
msg = f"Using fallback name: {mod_name}\n"
|
||||||
|
self._safe_update_output(msg)
|
||||||
|
print(msg.strip())
|
||||||
|
|
||||||
|
core_mods.append((mod_id, mod_name))
|
||||||
|
seen_core_mod_ids.add(mod_id)
|
||||||
|
msg = f"Added to core_mods: {mod_id} -> {mod_name}\n"
|
||||||
|
self._safe_update_output(msg)
|
||||||
|
print(msg.strip())
|
||||||
|
|
||||||
|
msg = "Seeding base game Core entry...\n"
|
||||||
|
self._safe_update_output(msg)
|
||||||
|
print(msg.strip())
|
||||||
|
add_core_mod(base_game_id)
|
||||||
|
|
||||||
|
# Find knownExpansions section and include all owned expansions after Core
|
||||||
known_expansions_element = root.find('knownExpansions')
|
known_expansions_element = root.find('knownExpansions')
|
||||||
if known_expansions_element is not None:
|
if known_expansions_element is not None:
|
||||||
msg = "Found knownExpansions section, processing all DLC...\n"
|
msg = "Found knownExpansions section, processing entries...\n"
|
||||||
self._safe_update_output(msg)
|
self._safe_update_output(msg)
|
||||||
print(msg.strip())
|
print(msg.strip())
|
||||||
for li in known_expansions_element.findall('li'):
|
for li in known_expansions_element.findall('li'):
|
||||||
expansion_id = li.text
|
expansion_id = li.text
|
||||||
if expansion_id:
|
if expansion_id:
|
||||||
expansion_id = expansion_id.strip()
|
expansion_id = expansion_id.strip()
|
||||||
msg = f"Processing DLC: {expansion_id}\n"
|
msg = f"Processing known expansion: {expansion_id}\n"
|
||||||
self._safe_update_output(msg)
|
|
||||||
print(msg.strip())
|
|
||||||
# Use the same method as DLC detection to get real names
|
|
||||||
mod_name = self.get_expansion_real_name(expansion_id, rimworld_data_path)
|
|
||||||
msg = f"get_expansion_real_name returned: {mod_name}\n"
|
|
||||||
self._safe_update_output(msg)
|
|
||||||
print(msg.strip())
|
|
||||||
if not mod_name:
|
|
||||||
mod_name = self.get_default_mod_name(expansion_id)
|
|
||||||
msg = f"Using fallback name: {mod_name}\n"
|
|
||||||
self._safe_update_output(msg)
|
|
||||||
print(msg.strip())
|
|
||||||
core_mods.append((expansion_id, mod_name))
|
|
||||||
msg = f"Added to core_mods: {expansion_id} -> {mod_name}\n"
|
|
||||||
self._safe_update_output(msg)
|
self._safe_update_output(msg)
|
||||||
print(msg.strip())
|
print(msg.strip())
|
||||||
|
add_core_mod(expansion_id)
|
||||||
else:
|
else:
|
||||||
msg = "No knownExpansions section found in ModsConfig.xml\n"
|
msg = "No knownExpansions section found in ModsConfig.xml\n"
|
||||||
self._safe_update_output(msg)
|
self._safe_update_output(msg)
|
||||||
@@ -3583,7 +3603,7 @@ class SteamWorkshopGUI:
|
|||||||
|
|
||||||
if not core_mods:
|
if not core_mods:
|
||||||
# Fallback if no expansions found - just base game
|
# Fallback if no expansions found - just base game
|
||||||
core_mods = [('ludeon.rimworld', 'RimWorld')]
|
core_mods = [(base_game_id, self.get_default_mod_name(base_game_id))]
|
||||||
msg = "No expansions found, using fallback base game only\n"
|
msg = "No expansions found, using fallback base game only\n"
|
||||||
self._safe_update_output(msg)
|
self._safe_update_output(msg)
|
||||||
print(msg.strip())
|
print(msg.strip())
|
||||||
@@ -3599,7 +3619,7 @@ class SteamWorkshopGUI:
|
|||||||
msg = f"Error reading core mods: {str(e)}\n"
|
msg = f"Error reading core mods: {str(e)}\n"
|
||||||
self._safe_update_output(msg)
|
self._safe_update_output(msg)
|
||||||
print(msg.strip())
|
print(msg.strip())
|
||||||
core_mods = [('ludeon.rimworld', 'RimWorld')]
|
core_mods = [(base_game_id, self.get_default_mod_name(base_game_id))]
|
||||||
|
|
||||||
return core_mods
|
return core_mods
|
||||||
|
|
||||||
@@ -3640,15 +3660,19 @@ class SteamWorkshopGUI:
|
|||||||
|
|
||||||
def extract_name_from_id(self, expansion_id):
|
def extract_name_from_id(self, expansion_id):
|
||||||
"""Extract expansion name from ID as fallback"""
|
"""Extract expansion name from ID as fallback"""
|
||||||
if 'royalty' in expansion_id.lower():
|
normalized_id = expansion_id.lower()
|
||||||
|
|
||||||
|
if normalized_id == 'ludeon.rimworld':
|
||||||
|
return 'Core'
|
||||||
|
elif 'royalty' in normalized_id:
|
||||||
return 'Royalty'
|
return 'Royalty'
|
||||||
elif 'ideology' in expansion_id.lower():
|
elif 'ideology' in normalized_id:
|
||||||
return 'Ideology'
|
return 'Ideology'
|
||||||
elif 'biotech' in expansion_id.lower():
|
elif 'biotech' in normalized_id:
|
||||||
return 'Biotech'
|
return 'Biotech'
|
||||||
elif 'anomaly' in expansion_id.lower():
|
elif 'anomaly' in normalized_id:
|
||||||
return 'Anomaly'
|
return 'Anomaly'
|
||||||
elif 'odyssey' in expansion_id.lower():
|
elif 'odyssey' in normalized_id:
|
||||||
return 'Odyssey'
|
return 'Odyssey'
|
||||||
else:
|
else:
|
||||||
# Extract the last part after the last dot and capitalize
|
# Extract the last part after the last dot and capitalize
|
||||||
@@ -3660,7 +3684,7 @@ class SteamWorkshopGUI:
|
|||||||
def get_default_mod_name(self, mod_id):
|
def get_default_mod_name(self, mod_id):
|
||||||
"""Get default display name for core mods"""
|
"""Get default display name for core mods"""
|
||||||
default_names = {
|
default_names = {
|
||||||
'ludeon.rimworld': 'RimWorld',
|
'ludeon.rimworld': 'Core',
|
||||||
'ludeon.rimworld.royalty': 'Royalty',
|
'ludeon.rimworld.royalty': 'Royalty',
|
||||||
'ludeon.rimworld.ideology': 'Ideology',
|
'ludeon.rimworld.ideology': 'Ideology',
|
||||||
'ludeon.rimworld.biotech': 'Biotech',
|
'ludeon.rimworld.biotech': 'Biotech',
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ Configuration settings for the update checker
|
|||||||
# Update checker configuration
|
# Update checker configuration
|
||||||
UPDATE_CONFIG = {
|
UPDATE_CONFIG = {
|
||||||
# Current version of the application
|
# Current version of the application
|
||||||
"current_version": "0.2.0",
|
"current_version": "0.2.2",
|
||||||
|
|
||||||
# Repository information
|
# Repository information
|
||||||
"repo_owner": "HRiggs",
|
"repo_owner": "HRiggs",
|
||||||
|
|||||||
Reference in New Issue
Block a user