From f046d76c59a8aee322f906629c2a165c18d406d2 Mon Sep 17 00:00:00 2001 From: CaitSith2 Date: Tue, 22 Feb 2022 12:49:43 -0800 Subject: [PATCH] make sure starting location hints also apply to all applicable item_link players. --- Main.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Main.py b/Main.py index 7044e821..526bb733 100644 --- a/Main.py +++ b/Main.py @@ -336,15 +336,15 @@ def main(args, seed=None, baked_server_options: Optional[Dict[str, object]] = No if world.worlds[slot].sending_visible: sending_visible_players.add(slot) - def precollect_hint(location, group_players=None): + def precollect_hint(location): entrance = er_hint_data.get(location.player, {}).get(location.address, "") hint = NetUtils.Hint(location.item.player, location.player, location.address, location.item.code, False, entrance, location.item.flags) precollected_hints[location.player].add(hint) - if not group_players: + if location.item.player not in world.groups: precollected_hints[location.item.player].add(hint) else: - for player in group_players: + for player in world.groups[location.item.player]["players"]: precollected_hints[player].add(hint) locations_data: Dict[int, Dict[int, Tuple[int, int, int]]] = {player: {} for player in world.player_ids} @@ -360,12 +360,9 @@ def main(args, seed=None, baked_server_options: Optional[Dict[str, object]] = No precollect_hint(location) elif location.item.name in world.start_hints[location.item.player]: precollect_hint(location) - elif location.item.player in world.groups: - group_players = world.groups[location.item.player]["players"] - for player in group_players: - if location.item.name in world.start_hints[player]: - precollect_hint(location, group_players) - break # Everyone in the group benefits from the start hint. + elif any([location.item.name in world.start_hints[player] + for player in world.groups.get(location.item.player, {}).get("players", [])]): + precollect_hint(location) multidata = { "slot_data": slot_data,