From 5a4d88d554b25b446169d6cf33d1bd7974fe73bd Mon Sep 17 00:00:00 2001 From: qwint Date: Sun, 10 Mar 2024 08:46:44 -0500 Subject: [PATCH] Clients: add /item_groups and /location_groups (#2822) --- CommonClient.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CommonClient.py b/CommonClient.py index c75ca3fd..3665b9f1 100644 --- a/CommonClient.py +++ b/CommonClient.py @@ -115,6 +115,15 @@ class ClientCommandProcessor(CommandProcessor): 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: @@ -124,6 +133,15 @@ class ClientCommandProcessor(CommandProcessor): 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