make sure starting location hints also apply to all applicable item_link players.
This commit is contained in:
parent
53ab224fba
commit
f046d76c59
15
Main.py
15
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,
|
||||
|
|
Loading…
Reference in New Issue