Bläddra i källkod

Trying to fix trading back and forth issue.

Steve Thielemann 5 år sedan
förälder
incheckning
343c1d80bf
2 ändrade filer med 8 tillägg och 1 borttagningar
  1. 1 1
      flexible.py
  2. 7 0
      galaxy.py

+ 1 - 1
flexible.py

@@ -822,7 +822,7 @@ class ScriptPort(object):
         # state 5
         log.debug("trade!")
         self.queue_player.put("pt")   # Port Trade
-
+        self.fixable = False
         self.this_port = self.game.gamedata.ports[self.this_sector]
         # I think other_sector will alway be correct, but leaving this
         # for now.   FUTURE: TODO:  REMOVE

+ 7 - 0
galaxy.py

@@ -245,6 +245,13 @@ class GameData(object):
                     )
                 )
                 return True
+            else:
+                log.warn(
+                    "port_buying( {0}, {1}): No, units < 40 {2}".format(
+                        sector, cargo, port[cargo_key]["sale"]
+                    )
+                )
+                return False
         else:
             log.warn(
                 "port_buying( {0}, {1}): Yes, buying (but values unknown)".format(