Преглед на файлове

Fixes PlanetUp issue when buying.

If the port has < max holds, and the port sells other things,
it'll offer something else to sell to us.  This fixes that.
It doesn't hang at the "How many hold of" prompt, it answers 0.
Steve Thielemann преди 5 години
родител
ревизия
4931709aa4
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      flexible.py

+ 3 - 0
flexible.py

@@ -2244,6 +2244,9 @@ class PlanetUpScript(object):
                     self.queue_player.put("T\r")
                     self.state = 8
         elif self.state == 8:
+            if re.match(r"How many holds of .+ do you want to buy \[\d+\]\? ", prompt):
+                # No, no, we're done buying!
+                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))