Skip to content

Commit

Permalink
Clients: add /item_groups and /location_groups (ArchipelagoMW#2822)
Browse files Browse the repository at this point in the history
  • Loading branch information
qwint authored and EmilyV99 committed Apr 15, 2024
1 parent 499ab6c commit 15bd9a5
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions CommonClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,15 @@ def _cmd_items(self):
for item_name in AutoWorldRegister.world_types[self.ctx.game].item_name_to_id:
self.output(item_name)

def _cmd_item_groups(self):
"""List all item group names for the currently running game."""
if not self.ctx.game:
self.output("No game set, cannot determine existing item groups.")
return False
self.output(f"Item Group Names for {self.ctx.game}")
for group_name in AutoWorldRegister.world_types[self.ctx.game].item_name_groups:
self.output(group_name)

def _cmd_locations(self):
"""List all location names for the currently running game."""
if not self.ctx.game:
Expand All @@ -124,6 +133,15 @@ def _cmd_locations(self):
for location_name in AutoWorldRegister.world_types[self.ctx.game].location_name_to_id:
self.output(location_name)

def _cmd_location_groups(self):
"""List all location group names for the currently running game."""
if not self.ctx.game:
self.output("No game set, cannot determine existing location groups.")
return False
self.output(f"Location Group Names for {self.ctx.game}")
for group_name in AutoWorldRegister.world_types[self.ctx.game].location_name_groups:
self.output(group_name)

def _cmd_ready(self):
"""Send ready status to server."""
self.ctx.ready = not self.ctx.ready
Expand Down

0 comments on commit 15bd9a5

Please sign in to comment.