[Bug] fixed collect

This commit is contained in:
Jarno Westhof 2022-01-21 23:09:17 +01:00 committed by Fabian Dill
parent 02e776bfe5
commit 929c684977
1 changed files with 2 additions and 2 deletions

View File

@ -671,8 +671,8 @@ def collect_player(ctx: Context, team: int, slot: int):
"""register any locations that are in the multidata, pointing towards this player""" """register any locations that are in the multidata, pointing towards this player"""
all_locations = collections.defaultdict(set) all_locations = collections.defaultdict(set)
for source_slot, location_data in ctx.locations.items(): for source_slot, location_data in ctx.locations.items():
for location_id, (item_id, target_player_id) in location_data.items(): for location_id, values in location_data.items():
if target_player_id == slot: if values[1] == slot:
all_locations[source_slot].add(location_id) all_locations[source_slot].add(location_id)
ctx.notify_all("%s (Team #%d) has collected" % (ctx.player_names[(team, slot)], team + 1)) ctx.notify_all("%s (Team #%d) has collected" % (ctx.player_names[(team, slot)], team + 1))