From 25dd89ed17c6509b84b5343086846be5a1b4d425 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Fri, 28 Jan 2022 09:29:29 +0100 Subject: [PATCH] MultiServer: delete unused function --- Fill.py | 4 ++-- MultiServer.py | 5 ----- SNIClient.py | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Fill.py b/Fill.py index cf88f6d9..2a85d9ce 100644 --- a/Fill.py +++ b/Fill.py @@ -167,7 +167,7 @@ def distribute_items_restrictive(world: MultiWorld): if progitempool: fill_restrictive(world, world.state, defaultlocations, progitempool) - if(len(progitempool) > 0): + if progitempool: raise FillError( f'Not enough locations for progress items. There are {len(progitempool)} more items than locations') @@ -176,7 +176,7 @@ def distribute_items_restrictive(world: MultiWorld): # needs logical fill to not conflict with local items nonexcludeditempool, defaultlocations = fast_fill( world, nonexcludeditempool, defaultlocations) - if(len(nonexcludeditempool) > 0): + if nonexcludeditempool: raise FillError( f'Not enough locations for non-excluded items. There are {len(nonexcludeditempool)} more items than locations') diff --git a/MultiServer.py b/MultiServer.py index 47ebecb3..45749893 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -734,11 +734,6 @@ def register_location_checks(ctx: Context, team: int, slot: int, locations: typi ctx.save() -def notify_team(ctx: Context, team: int, text: str): - logging.info("Notice (Team #%d): %s" % (team + 1, text)) - ctx.broadcast_team(team, [['Print', {"text": text}]]) - - def collect_hints(ctx: Context, team: int, slot: int, item: str) -> typing.List[NetUtils.Hint]: hints = [] seeked_item_id = proxy_worlds[ctx.games[slot]].item_name_to_id[item] diff --git a/SNIClient.py b/SNIClient.py index c63ed48a..24438138 100644 --- a/SNIClient.py +++ b/SNIClient.py @@ -190,7 +190,7 @@ async def deathlink_kill_player(ctx: Context): snes_buffered_write(ctx, WRAM_START + 0x09D6, bytes([0, 0])) # set current reserve to 0 await snes_flush_writes(ctx) await asyncio.sleep(1) - gamemode = None + if ctx.game == GAME_ALTTP: gamemode = await snes_read(ctx, WRAM_START + 0x10, 1) if not gamemode or gamemode[0] in DEATH_MODES: