From 10b7c83f1d5bfe34e7999880fa003ea5756c7f81 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sun, 10 Jan 2021 14:50:38 +0100 Subject: [PATCH] Just use locations in the multidata, not static IDs, for forfeits Should also work better for *other* games --- MultiServer.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/MultiServer.py b/MultiServer.py index 6fa1785c..6586fd15 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -473,10 +473,8 @@ def send_new_items(ctx: Context): def forfeit_player(ctx: Context, team: int, slot: int): - all_locations = {values[0] for values in Regions.location_table.values() if type(values[0]) is int} - all_locations.update({values[1] for values in Regions.key_drop_data.values()}) - # register any unknown locations, such as from future versions to be forfeited too - all_locations.update(location for location, location_slot in ctx.locations if location_slot == slot) + # register any locations that are in the multidata + all_locations = {location_id for location_id, location_slot in ctx.locations if location_slot == slot} ctx.notify_all("%s (Team #%d) has forfeited" % (ctx.player_names[(team, slot)], team + 1)) register_location_checks(ctx, team, slot, all_locations)