|
@@ -96,7 +96,7 @@ class PlayerInput(object):
|
|
|
self.c = merge(Style.BRIGHT + Fore.WHITE + Back.BLUE)
|
|
|
self.cp = merge(Style.BRIGHT + Fore.YELLOW + Back.BLUE)
|
|
|
|
|
|
- # useful consts
|
|
|
+ # useful constants
|
|
|
self.r = Style.RESET_ALL
|
|
|
self.nl = "\n\r"
|
|
|
self.bsb = "\b \b"
|
|
@@ -1322,14 +1322,17 @@ class ScriptExplore(object):
|
|
|
if line.startswith('The shortest path ('):
|
|
|
# Ok, we've got a path.
|
|
|
self.state += 1
|
|
|
+ self.travel_path = []
|
|
|
elif self.state == 11:
|
|
|
- # TOFIX: This can be multiple lines
|
|
|
- self.travel_path = line.replace('(', '').replace(')', '').split(' > ')
|
|
|
- log.debug("Travel path: {0}".format(self.travel_path))
|
|
|
- self.state += 1
|
|
|
- self.travel_path.pop(0) # First sector is one we're in.
|
|
|
- self.stophere = False
|
|
|
- self.go_on = True
|
|
|
+ if line == '':
|
|
|
+ # The end of the (possibly) multiline warp.
|
|
|
+ self.state += 1
|
|
|
+ self.travel_path.pop(0) # First sector is one we're in.
|
|
|
+ self.stophere = False
|
|
|
+ self.go_on = True
|
|
|
+ else:
|
|
|
+ self.travel_path.extend(line.replace('(', '').replace(')', '').split(' > ') )
|
|
|
+ log.debug("Travel path: {0}".format(self.travel_path))
|
|
|
elif self.state == 12:
|
|
|
# Arriving sector :1691 Autopilot disengaging.
|
|
|
if 'Autopilot disengaging.' in line:
|