Stop using get_options (#5341)

This commit is contained in:
PoryGone
2025-08-27 09:21:53 -04:00
committed by GitHub
parent e11b40c94b
commit 750c8a9810
3 changed files with 6 additions and 5 deletions

View File

@@ -1,3 +1,4 @@
import Utils
from Utils import read_snes_rom
from worlds.AutoWorld import World
@@ -735,9 +736,9 @@ def get_base_rom_bytes(file_name: str = "") -> bytes:
return base_rom_bytes
def get_base_rom_path(file_name: str = "") -> str:
options = Utils.get_options()
if not file_name:
file_name = options["dkc3_options"]["rom_file"]
from settings import get_settings
file_name = get_settings()["dkc3_options"]["rom_file"]
if not os.path.exists(file_name):
file_name = Utils.user_path(file_name)
return file_name

View File

@@ -808,7 +808,7 @@ def create_regions(world: World, active_locations):
lambda state: (state.has(ItemName.blue_switch_palace, player) and
(state.has(ItemName.p_switch, player) or
state.has(ItemName.green_switch_palace, player) or
(state.has(ItemName.yellow_switch_palace, player) or state.has(ItemName.red_switch_palace, player)))))
(state.has(ItemName.yellow_switch_palace, player) and state.has(ItemName.red_switch_palace, player)))))
add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_3_region, LocationName.chocolate_island_3_dragon)
add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_4_region, LocationName.chocolate_island_4_dragon,
lambda state: (state.has(ItemName.p_switch, player) and

View File

@@ -3185,9 +3185,9 @@ def get_base_rom_bytes(file_name: str = "") -> bytes:
def get_base_rom_path(file_name: str = "") -> str:
options = Utils.get_options()
if not file_name:
file_name = options["smw_options"]["rom_file"]
from settings import get_settings
file_name = get_settings()["smw_options"]["rom_file"]
if not os.path.exists(file_name):
file_name = Utils.user_path(file_name)
return file_name