Second round of Treble code reviews.

This commit is contained in:
massimilianodelliubaldini
2025-04-05 22:01:08 -04:00
parent f62d9bc049
commit 960f73cb8b

View File

@@ -20,7 +20,6 @@ from pymem.exception import ProcessNotFound
# Archipelago imports
import ModuleUpdate
import Utils
import settings
from CommonClient import ClientCommandProcessor, CommonContext, server_loop, gui_enabled
from NetUtils import ClientStatus
@@ -30,6 +29,7 @@ from .GameID import jak1_name
from .Options import EnableOrbsanity
from .client.MemoryReader import JakAndDaxterMemoryReader
from .client.ReplClient import JakAndDaxterReplClient
from . import JakAndDaxterWorld
ModuleUpdate.update()
@@ -427,12 +427,11 @@ async def run_game(ctx: JakAndDaxterContext):
ctx.on_log_warn(logger, "Compiler not running, attempting to start.")
try:
ap_settings = settings.get_settings()
auto_detect_root_directory = ap_settings.jakanddaxter_options.auto_detect_root_directory
auto_detect_root_directory = JakAndDaxterWorld.settings.auto_detect_root_directory
if auto_detect_root_directory:
root_path = find_root_directory(ctx)
else:
root_path = ap_settings.jakanddaxter_options.root_directory
root_path = JakAndDaxterWorld.settings.root_directory
# Always trust your instincts... the user may not have entered their root_directory properly.
# We don't have to do this check if the root directory was auto-detected.