Update base.py

This commit is contained in:
Richard Bronkhorst 2023-06-26 05:48:19 +02:00
parent 7eea63ac82
commit 11031599cf

View File

@ -181,6 +181,7 @@ class BaseMission(Mission):
return 'done'
dest = self.store.get(Waypoint, traject[-1])
loc = self.ship.location()
print(dest, loc)
if dest == loc:
self.sts('traject', None)
return 'done'
@ -204,6 +205,10 @@ class BaseMission(Mission):
loc_jg = self.analyzer.get_jumpgate(loc_sys)
dest_sys = self.store.get(System, dest.system())
dest_jg = self.analyzer.get_jumpgate(dest_sys)
if dest_sys == loc_sys:
result = [dest.symbol]
self.sts('traject', result)
return
path = self.analyzer.find_path(loc_sys, dest_sys)
result = []
if loc.symbol != loc_jg.symbol: