[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:
@@ -20,6 +20,8 @@ from worlds.tloz.Items import item_game_ids
|
|||||||
from worlds.tloz.Locations import location_ids
|
from worlds.tloz.Locations import location_ids
|
||||||
from worlds.tloz import Items, Locations, Rom
|
from worlds.tloz import Items, Locations, Rom
|
||||||
|
|
||||||
|
from settings import get_settings
|
||||||
|
|
||||||
SYSTEM_MESSAGE_ID = 0
|
SYSTEM_MESSAGE_ID = 0
|
||||||
|
|
||||||
CONNECTION_TIMING_OUT_STATUS = "Connection timing out. Please restart your emulator, then restart connector_tloz.lua"
|
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
|
# Text Mode to use !hint and such with games that have no text entry
|
||||||
Utils.init_logging("ZeldaClient")
|
Utils.init_logging("ZeldaClient")
|
||||||
|
|
||||||
options = Utils.get_options()
|
DISPLAY_MSGS = get_settings()["tloz_options"]["display_msgs"]
|
||||||
DISPLAY_MSGS = options["tloz_options"]["display_msgs"]
|
|
||||||
|
|
||||||
|
|
||||||
async def run_game(romfile: str) -> None:
|
async def run_game(romfile: str) -> None:
|
||||||
auto_start = typing.cast(typing.Union[bool, str],
|
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:
|
if auto_start is True:
|
||||||
import webbrowser
|
import webbrowser
|
||||||
webbrowser.open(romfile)
|
webbrowser.open(romfile)
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ class TLoZDeltaPatch(APDeltaPatch):
|
|||||||
def get_base_rom_bytes(file_name: str = "") -> bytes:
|
def get_base_rom_bytes(file_name: str = "") -> bytes:
|
||||||
base_rom_bytes = getattr(get_base_rom_bytes, "base_rom_bytes", None)
|
base_rom_bytes = getattr(get_base_rom_bytes, "base_rom_bytes", None)
|
||||||
if not base_rom_bytes:
|
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")))
|
base_rom_bytes = bytes(Utils.read_snes_rom(open(file_name, "rb")))
|
||||||
|
|
||||||
basemd5 = hashlib.md5()
|
basemd5 = hashlib.md5()
|
||||||
|
|||||||
Reference in New Issue
Block a user