Update central_command.py, commander.py and one other file
This commit is contained in:
parent
d6fe1cf183
commit
3010a8186d
@ -31,6 +31,15 @@ class CentralCommand:
|
|||||||
mission.step()
|
mission.step()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def run_interactive(self):
|
||||||
|
print('auto mode. hit enter to stop')
|
||||||
|
t = Thread(target=self.wait_for_stop)
|
||||||
|
t.daemon = True
|
||||||
|
t.start()
|
||||||
|
self.run()
|
||||||
|
print('manual mode')
|
||||||
|
|
||||||
|
|
||||||
def wait_for_stop(self):
|
def wait_for_stop(self):
|
||||||
try:
|
try:
|
||||||
input()
|
input()
|
||||||
@ -39,13 +48,6 @@ class CentralCommand:
|
|||||||
self.stopping = True
|
self.stopping = True
|
||||||
print('stopping...')
|
print('stopping...')
|
||||||
|
|
||||||
def run_interactive(self):
|
|
||||||
print('auto mode. hit enter to stop')
|
|
||||||
t = Thread(target=self.wait_for_stop)
|
|
||||||
t.daemon = True
|
|
||||||
t.start()
|
|
||||||
self.run()
|
|
||||||
print('manual mode')
|
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self.update_missions()
|
self.update_missions()
|
||||||
|
@ -123,6 +123,8 @@ class Commander(CommandLine):
|
|||||||
|
|
||||||
def do_chaul(self):
|
def do_chaul(self):
|
||||||
if not self.has_ship(): return
|
if not self.has_ship(): return
|
||||||
|
if len(ship.cargo) > 0:
|
||||||
|
raise CommandError('please dump cargo first')
|
||||||
contract = self.active_contract()
|
contract = self.active_contract()
|
||||||
delivery = contract.unfinished_delivery()
|
delivery = contract.unfinished_delivery()
|
||||||
if delivery is None:
|
if delivery is None:
|
||||||
|
@ -25,6 +25,7 @@ class Marketplace(SystemMember):
|
|||||||
price['symbol'] = symbol
|
price['symbol'] = symbol
|
||||||
price['buy'] = mg(g, 'purchasePrice')
|
price['buy'] = mg(g, 'purchasePrice')
|
||||||
price['sell'] = mg(g, 'sellPrice')
|
price['sell'] = mg(g, 'sellPrice')
|
||||||
|
price['volume'] = mg(g, 'tradeVolume')
|
||||||
prices[symbol] = price
|
prices[symbol] = price
|
||||||
self.prices = prices
|
self.prices = prices
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user