[TLOZ] Remove deprecated Utils.get_options call, part 2 (#5371)

* Updated to remove deprecated call.

* Removed unused argument.

* Removed errant client calls to Utils.get_options, and fixed call in Rom.py that was passing an argument.
This commit is contained in:
Rosalie
2025-08-27 13:28:42 -04:00
committed by GitHub
parent 750c8a9810
commit 439be48f36
2 changed files with 5 additions and 4 deletions

View File

@@ -20,6 +20,8 @@ from worlds.tloz.Items import item_game_ids
from worlds.tloz.Locations import location_ids
from worlds.tloz import Items, Locations, Rom
from settings import get_settings
SYSTEM_MESSAGE_ID = 0
CONNECTION_TIMING_OUT_STATUS = "Connection timing out. Please restart your emulator, then restart connector_tloz.lua"
@@ -341,13 +343,12 @@ if __name__ == '__main__':
# Text Mode to use !hint and such with games that have no text entry
Utils.init_logging("ZeldaClient")
options = Utils.get_options()
DISPLAY_MSGS = options["tloz_options"]["display_msgs"]
DISPLAY_MSGS = get_settings()["tloz_options"]["display_msgs"]
async def run_game(romfile: str) -> None:
auto_start = typing.cast(typing.Union[bool, str],
Utils.get_options()["tloz_options"].get("rom_start", True))
get_settings()["tloz_options"].get("rom_start", True))
if auto_start is True:
import webbrowser
webbrowser.open(romfile)

View File

@@ -58,7 +58,7 @@ class TLoZDeltaPatch(APDeltaPatch):
def get_base_rom_bytes(file_name: str = "") -> bytes:
base_rom_bytes = getattr(get_base_rom_bytes, "base_rom_bytes", None)
if not base_rom_bytes:
file_name = get_base_rom_path(file_name)
file_name = get_base_rom_path()
base_rom_bytes = bytes(Utils.read_snes_rom(open(file_name, "rb")))
basemd5 = hashlib.md5()