mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Clients: add /item_groups and /location_groups (#2822)
This commit is contained in:
@@ -115,6 +115,15 @@ class ClientCommandProcessor(CommandProcessor):
|
|||||||
for item_name in AutoWorldRegister.world_types[self.ctx.game].item_name_to_id:
|
for item_name in AutoWorldRegister.world_types[self.ctx.game].item_name_to_id:
|
||||||
self.output(item_name)
|
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):
|
def _cmd_locations(self):
|
||||||
"""List all location names for the currently running game."""
|
"""List all location names for the currently running game."""
|
||||||
if not self.ctx.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:
|
for location_name in AutoWorldRegister.world_types[self.ctx.game].location_name_to_id:
|
||||||
self.output(location_name)
|
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):
|
def _cmd_ready(self):
|
||||||
"""Send ready status to server."""
|
"""Send ready status to server."""
|
||||||
self.ctx.ready = not self.ctx.ready
|
self.ctx.ready = not self.ctx.ready
|
||||||
|
Reference in New Issue
Block a user