mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-03-24 11:43:26 -07:00
Properly use the settings API instead of Utils.
This commit is contained in:
@@ -20,6 +20,7 @@ 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
|
||||
@@ -433,12 +434,12 @@ async def run_game(ctx: JakAndDaxterContext):
|
||||
ctx.on_log_warn(logger, "Compiler not running, attempting to start.")
|
||||
|
||||
try:
|
||||
settings = Utils.get_settings()
|
||||
auto_detect_root_directory = settings["jakanddaxter_options"]["auto_detect_root_directory"]
|
||||
ap_settings = settings.get_settings()
|
||||
auto_detect_root_directory = ap_settings.jakanddaxter_options.auto_detect_root_directory
|
||||
if auto_detect_root_directory:
|
||||
root_path = find_root_directory(ctx)
|
||||
else:
|
||||
root_path = settings["jakanddaxter_options"]["root_directory"]
|
||||
root_path = ap_settings.jakanddaxter_options.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.
|
||||
|
||||
@@ -4,7 +4,6 @@ from typing import Any, ClassVar, Callable, Union, cast
|
||||
|
||||
# Archipelago imports
|
||||
import settings
|
||||
import Utils
|
||||
|
||||
from worlds.AutoWorld import World, WebWorld
|
||||
from worlds.LauncherComponents import components, Component, launch_subprocess, Type, icon_paths
|
||||
@@ -249,7 +248,8 @@ class JakAndDaxterWorld(World):
|
||||
# For the fairness of other players in a multiworld game, enforce some friendly limitations on our options,
|
||||
# so we don't cause chaos during seed generation. These friendly limits should **guarantee** a successful gen.
|
||||
# We would have done this earlier, but we needed to sort the power cell thresholds first.
|
||||
enforce_friendly_options = Utils.get_settings()["jakanddaxter_options"]["enforce_friendly_options"]
|
||||
ap_settings = settings.get_settings()
|
||||
enforce_friendly_options = ap_settings.jakanddaxter_options.enforce_friendly_options
|
||||
if enforce_friendly_options:
|
||||
if self.multiworld.players > 1:
|
||||
from .Rules import enforce_multiplayer_limits
|
||||
|
||||
Reference in New Issue
Block a user