1111
1212
1313import Utils
14+ from settings import get_settings
1415from NetUtils import ClientStatus
1516from Utils import async_start
1617from 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
417418async 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