Update commander.py
This commit is contained in:
parent
21f93f078d
commit
3a85c6c367
@ -216,6 +216,17 @@ class Commander(CommandLine):
|
|||||||
else:
|
else:
|
||||||
r = list(self.store.all('Contract'))
|
r = list(self.store.all('Contract'))
|
||||||
pprint(r)
|
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=''):
|
def do_ship(self, arg=''):
|
||||||
if arg != '':
|
if arg != '':
|
||||||
|
Loading…
Reference in New Issue
Block a user