Network: allow filtering checked and missing by text fragment

This commit is contained in:
Fabian Dill
2023-03-08 17:53:43 +01:00
committed by Fabian Dill
parent 4c24872264
commit a61a1f58c6
2 changed files with 27 additions and 10 deletions

View File

@@ -68,14 +68,17 @@ class ClientCommandProcessor(CommandProcessor):
self.output(f"{self.ctx.item_names[item.item]} from {self.ctx.player_names[item.player]}")
return True
def _cmd_missing(self) -> bool:
"""List all missing location checks, from your local game state"""
def _cmd_missing(self, filter_text = "") -> bool:
"""List all missing location checks, from your local game state.
Can be given text, which will be used as filter."""
if not self.ctx.game:
self.output("No game set, cannot determine missing checks.")
return False
count = 0
checked_count = 0
for location, location_id in AutoWorldRegister.world_types[self.ctx.game].location_name_to_id.items():
if filter_text and filter_text not in location:
continue
if location_id < 0:
continue
if location_id not in self.ctx.locations_checked: