From 38d26049fc881948cbf1068517624f85fd788a6f Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Thu, 13 Jun 2024 06:20:17 +0200 Subject: [PATCH] ItemLinks - Untested --- MultiServer.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/MultiServer.py b/MultiServer.py index a257d65712fc..8cd2dcc9a65f 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -1807,10 +1807,11 @@ async def process_client_cmd(ctx: Context, client: Client, args: dict): return target_item, target_player, flags = ctx.locations[client.slot][location] - # Only allow scouting other players' locations if the item is for the slot that sent the scout - # TODO: Allow scouting Item Links items that *lead* to an item for client_player? - if client_player != desired_player and client_player != target_player: - continue + if client_player != desired_player: + # Only allow scouting other players' locations if the item is for client_player, + # or if the target_player is an item links group that the client_player is a part of. + if not (client_player == target_player or client_player in ctx.groups.get(target_player, set())): + continue if create_as_hint: hints.extend(collect_hint_location_id(ctx, client.team, desired_player, location))