Skip to content

Commit 892830b

Browse files
alwaysintrebleEmilyV99
authored andcommitted
Core: Let location name groups work with /hint_location (ArchipelagoMW#2814)
1 parent 76b19c8 commit 892830b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

MultiServer.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -2090,15 +2090,20 @@ def _cmd_hint_location(self, player_name: str, *location_name: str) -> bool:
20902090

20912091
if full_name.isnumeric():
20922092
location, usable, response = int(full_name), True, None
2093-
elif self.ctx.location_names_for_game(game) is not None:
2094-
location, usable, response = get_intended_text(full_name, self.ctx.location_names_for_game(game))
2093+
elif game in self.ctx.all_location_and_group_names:
2094+
location, usable, response = get_intended_text(full_name, self.ctx.all_location_and_group_names[game])
20952095
else:
20962096
self.output("Can't look up location for unknown game. Hint for ID instead.")
20972097
return False
20982098

20992099
if usable:
21002100
if isinstance(location, int):
21012101
hints = collect_hint_location_id(self.ctx, team, slot, location)
2102+
elif game in self.ctx.location_name_groups and location in self.ctx.location_name_groups[game]:
2103+
hints = []
2104+
for loc_name_from_group in self.ctx.location_name_groups[game][location]:
2105+
if loc_name_from_group in self.ctx.location_names_for_game(game):
2106+
hints.extend(collect_hint_location_name(self.ctx, team, slot, loc_name_from_group))
21022107
else:
21032108
hints = collect_hint_location_name(self.ctx, team, slot, location)
21042109
if hints:

0 commit comments

Comments
 (0)