From 44a78cc821002a4b59feb3ffc9a195a8e28d5143 Mon Sep 17 00:00:00 2001 From: josephwhite <22449090+josephwhite@users.noreply.github.com> Date: Thu, 22 May 2025 09:26:28 -0400 Subject: [PATCH] OoT: Stop Using Utils.get_options (#4957) --- OoTClient.py | 5 +++-- worlds/oot/__init__.py | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/OoTClient.py b/OoTClient.py index 6a87b9e7..571300ed 100644 --- a/OoTClient.py +++ b/OoTClient.py @@ -12,6 +12,7 @@ from CommonClient import CommonContext, server_loop, gui_enabled, \ import Utils from Utils import async_start from worlds import network_data_package +from worlds.oot import OOTWorld from worlds.oot.Rom import Rom, compress_rom_file from worlds.oot.N64Patch import apply_patch_file from worlds.oot.Utils import data_path @@ -280,7 +281,7 @@ async def n64_sync_task(ctx: OoTContext): async def run_game(romfile): - auto_start = Utils.get_options()["oot_options"].get("rom_start", True) + auto_start = OOTWorld.settings.rom_start if auto_start is True: import webbrowser webbrowser.open(romfile) @@ -295,7 +296,7 @@ async def patch_and_run_game(apz5_file): decomp_path = base_name + '-decomp.z64' comp_path = base_name + '.z64' # Load vanilla ROM, patch file, compress ROM - rom_file_name = Utils.get_options()["oot_options"]["rom_file"] + rom_file_name = OOTWorld.settings.rom_file rom = Rom(rom_file_name) sub_file = None diff --git a/worlds/oot/__init__.py b/worlds/oot/__init__.py index 401c387d..ed025f49 100644 --- a/worlds/oot/__init__.py +++ b/worlds/oot/__init__.py @@ -30,7 +30,6 @@ from .Patches import OoTContainer, patch_rom from .N64Patch import create_patch_file from .Cosmetics import patch_cosmetics -from settings import get_settings from BaseClasses import MultiWorld, CollectionState, Tutorial, LocationProgressType from Options import Range, Toggle, VerifyKeys, Accessibility, PlandoConnections, PlandoItems from Fill import fill_restrictive, fast_fill, FillError @@ -203,7 +202,8 @@ class OOTWorld(World): @classmethod def stage_assert_generate(cls, multiworld: MultiWorld): - rom = Rom(file=get_settings()['oot_options']['rom_file']) + oot_settings = OOTWorld.settings + rom = Rom(file=oot_settings.rom_file) # Option parsing, handling incompatible options, building useful-item table @@ -1089,7 +1089,8 @@ class OOTWorld(World): self.hint_rng = self.random outfile_name = self.multiworld.get_out_file_name_base(self.player) - rom = Rom(file=get_settings()['oot_options']['rom_file']) + oot_settings = OOTWorld.settings + rom = Rom(file=oot_settings.rom_file) try: if self.hints != 'none': buildWorldGossipHints(self)