Update commander.py

This commit is contained in:
Richard Bronkhorst 2023-06-18 07:23:01 +02:00
parent 46f9597e2e
commit a229b9e300

View File

@ -88,7 +88,15 @@ class Commander(CommandLine):
r = self.api.list_systems(int(page))
pprint(self.api.last_meta)
def do_stats(self):
total = 0
for t in self.store.data:
num = len(self.store.data[t])
nam = t.__name__
total += num
print(f'{num:5d} {nam}')
print(f'{total:5d} total')
def do_waypoints(self, system_str=''):
if system_str == '':
if not self.has_ship(): return