Kaynağa Gözat

Instead of the workaround here's the fix

  We now ensure we are not in the same sector before issuing Express
Mode on travel... this should be about it.
david 4 yıl önce
ebeveyn
işleme
d17211d24d
1 değiştirilmiş dosya ile 8 ekleme ve 4 silme
  1. 8 4
      flexible.py

+ 8 - 4
flexible.py

@@ -2660,13 +2660,17 @@ class PlanetUpScript(object):
                 self.queue_player.put("0\r")
             if re.match(r"Command \[TL=.* \(\?=Help\)\? :", prompt):
                 # Ok, return to the planet...
-                self.queue_player.put("{0}\rE".format(self.planet_sector))
+                _, _, part = prompt.partition("]:[")
+                sector, _, _ = part.partition("]")
+                if sector != self.planet_sector:
+                    log.info("{0} is {1}".format(sector, self.planet_sector))
+                    self.queue_player.put("{0}\rE".format(self.planet_sector))
+                else:
+                    log.info("{0} is not {1}".format(sector, self.planet_sector))
+                    self.queue_player.put("\r")
                 self.state = 9
         elif self.state == 9:
             log.info("prompt9 {0} : {1}".format(self.state, prompt))
-            if prompt.startswith("Please enter a destination for this probe :"):
-                # Oops, this seems to happen when the port is in the same sector as the planet we are upgrading!
-                self.queue_player.put("\r")
             if re.match(r"Command \[TL=.* \(\?=Help\)\? :", prompt):
                 # land
                 self.queue_player.put("L")