Skip to content

Commit 1356479

Browse files
authored
AdventureClient: Replace Utils.get_settings with settings.get_settings #5043
1 parent ec5b4e7 commit 1356479

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

AdventureClient.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212

1313
import Utils
14+
from settings import get_settings
1415
from NetUtils import ClientStatus
1516
from Utils import async_start
1617
from CommonClient import CommonContext, server_loop, gui_enabled, ClientCommandProcessor, logger, \
@@ -80,8 +81,8 @@ def __init__(self, server_address, password):
8081
self.local_item_locations = {}
8182
self.dragon_speed_info = {}
8283

83-
options = Utils.get_settings()
84-
self.display_msgs = options["adventure_options"]["display_msgs"]
84+
options = get_settings().adventure_options
85+
self.display_msgs = options.display_msgs
8586

8687
async def server_auth(self, password_requested: bool = False):
8788
if password_requested and not self.password:
@@ -102,7 +103,7 @@ def _set_message(self, msg: str, msg_id: int):
102103
def on_package(self, cmd: str, args: dict):
103104
if cmd == 'Connected':
104105
self.locations_array = None
105-
if Utils.get_settings()["adventure_options"].get("death_link", False):
106+
if get_settings().adventure_options.as_dict().get("death_link", False):
106107
self.set_deathlink = True
107108
async_start(self.get_freeincarnates_used())
108109
elif cmd == "RoomInfo":
@@ -415,8 +416,9 @@ async def atari_sync_task(ctx: AdventureContext):
415416

416417

417418
async def run_game(romfile):
418-
auto_start = Utils.get_settings()["adventure_options"].get("rom_start", True)
419-
rom_args = Utils.get_settings()["adventure_options"].get("rom_args")
419+
options = get_settings().adventure_options
420+
auto_start = options.rom_start
421+
rom_args = options.rom_args
420422
if auto_start is True:
421423
import webbrowser
422424
webbrowser.open(romfile)

0 commit comments

Comments
 (0)