Update commander.py
This commit is contained in:
parent
21f93f078d
commit
3a85c6c367
@ -217,6 +217,17 @@ class Commander(CommandLine):
|
||||
r = list(self.store.all('Contract'))
|
||||
pprint(r)
|
||||
|
||||
def do_deliver(self):
|
||||
if not self.has_ship(): return
|
||||
site = self.ship.location_str
|
||||
contract = self.active_contract()
|
||||
delivery = contract.unfinished_delivery()
|
||||
if delivery is None:
|
||||
raise CommandError('no delivery')
|
||||
resource = delivery['trade_symbol']
|
||||
self.api.deliver(self.ship, resource, contract)
|
||||
pprint(contract)
|
||||
|
||||
def do_ship(self, arg=''):
|
||||
if arg != '':
|
||||
symbol = f'{self.agent.symbol}-{arg}'
|
||||
|
Loading…
Reference in New Issue
Block a user