Core: deprecate Utils.get_options and remove Utils.get_default_options (#2352)

* Core: deprecate Utils.get_options and remove Utils.get_default_options

* L2AC, Adventure: use settings instead of Utils.get_options
This commit is contained in:
black-sliver
2023-10-28 19:32:12 +02:00
committed by GitHub
parent 7bddea3ee8
commit bf46e0e60f
4 changed files with 11 additions and 16 deletions

View File

@@ -6,9 +6,8 @@ from typing import Optional, Any
import Utils
from .Locations import AdventureLocation, LocationData
from Utils import OptionsType
from settings import get_settings
from worlds.Files import APDeltaPatch, AutoPatchRegister, APContainer
from itertools import chain
import bsdiff4
@@ -313,9 +312,8 @@ def get_base_rom_bytes(file_name: str = "") -> bytes:
def get_base_rom_path(file_name: str = "") -> str:
options: OptionsType = Utils.get_options()
if not file_name:
file_name = options["adventure_options"]["rom_file"]
file_name = get_settings()["adventure_options"]["rom_file"]
if not os.path.exists(file_name):
file_name = Utils.user_path(file_name)
return file_name