mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-20 20:01:31 -06:00
OoT: Stop Using Utils.get_options (#4957)
This commit is contained in:
@@ -12,6 +12,7 @@ from CommonClient import CommonContext, server_loop, gui_enabled, \
|
|||||||
import Utils
|
import Utils
|
||||||
from Utils import async_start
|
from Utils import async_start
|
||||||
from worlds import network_data_package
|
from worlds import network_data_package
|
||||||
|
from worlds.oot import OOTWorld
|
||||||
from worlds.oot.Rom import Rom, compress_rom_file
|
from worlds.oot.Rom import Rom, compress_rom_file
|
||||||
from worlds.oot.N64Patch import apply_patch_file
|
from worlds.oot.N64Patch import apply_patch_file
|
||||||
from worlds.oot.Utils import data_path
|
from worlds.oot.Utils import data_path
|
||||||
@@ -280,7 +281,7 @@ async def n64_sync_task(ctx: OoTContext):
|
|||||||
|
|
||||||
|
|
||||||
async def run_game(romfile):
|
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:
|
if auto_start is True:
|
||||||
import webbrowser
|
import webbrowser
|
||||||
webbrowser.open(romfile)
|
webbrowser.open(romfile)
|
||||||
@@ -295,7 +296,7 @@ async def patch_and_run_game(apz5_file):
|
|||||||
decomp_path = base_name + '-decomp.z64'
|
decomp_path = base_name + '-decomp.z64'
|
||||||
comp_path = base_name + '.z64'
|
comp_path = base_name + '.z64'
|
||||||
# Load vanilla ROM, patch file, compress ROM
|
# 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)
|
rom = Rom(rom_file_name)
|
||||||
|
|
||||||
sub_file = None
|
sub_file = None
|
||||||
|
@@ -30,7 +30,6 @@ from .Patches import OoTContainer, patch_rom
|
|||||||
from .N64Patch import create_patch_file
|
from .N64Patch import create_patch_file
|
||||||
from .Cosmetics import patch_cosmetics
|
from .Cosmetics import patch_cosmetics
|
||||||
|
|
||||||
from settings import get_settings
|
|
||||||
from BaseClasses import MultiWorld, CollectionState, Tutorial, LocationProgressType
|
from BaseClasses import MultiWorld, CollectionState, Tutorial, LocationProgressType
|
||||||
from Options import Range, Toggle, VerifyKeys, Accessibility, PlandoConnections, PlandoItems
|
from Options import Range, Toggle, VerifyKeys, Accessibility, PlandoConnections, PlandoItems
|
||||||
from Fill import fill_restrictive, fast_fill, FillError
|
from Fill import fill_restrictive, fast_fill, FillError
|
||||||
@@ -203,7 +202,8 @@ class OOTWorld(World):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def stage_assert_generate(cls, multiworld: MultiWorld):
|
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
|
# Option parsing, handling incompatible options, building useful-item table
|
||||||
@@ -1089,7 +1089,8 @@ class OOTWorld(World):
|
|||||||
self.hint_rng = self.random
|
self.hint_rng = self.random
|
||||||
|
|
||||||
outfile_name = self.multiworld.get_out_file_name_base(self.player)
|
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:
|
try:
|
||||||
if self.hints != 'none':
|
if self.hints != 'none':
|
||||||
buildWorldGossipHints(self)
|
buildWorldGossipHints(self)
|
||||||
|
Reference in New Issue
Block a user