瀏覽代碼

ColoScript2 Update!

  We now manually add Terra as a planet you can choose from/to.
david 5 年之前
父節點
當前提交
f7b7840c46
共有 1 個文件被更改,包括 9 次插入3 次删除
  1. 9 3
      flexible.py

+ 9 - 3
flexible.py

@@ -2993,7 +2993,7 @@ class ColoScript2(object):
                 self.TO = 1
                 self.planet_name = "Terra"
                 ask1 = PlayerInput(self.game)
-                d1 = ask1.prompt("From: (1 = Terra) ", 3, name="from", digits=True)
+                d1 = ask1.prompt("From: ", 3, name="from", digits=True)
                 d1.addCallback(self.from_chosen)
             elif self.to_number in self.planets:
                 # Ok, this'll work
@@ -3002,7 +3002,7 @@ class ColoScript2(object):
                 # Are we really getting this? Yup
                 # log.debug("TO Planet Number: {0} Sector: {1}".format(self.to_number, self.TO))
                 ask1 = PlayerInput(self.game)
-                d1 = ask1.prompt("From: (1 = Terra) ", 3, name="from", digits=True)
+                d1 = ask1.prompt("From: ", 3, name="from", digits=True)
                 d1.addCallback(self.from_chosen)
             else:
                 self.deactivate(True)
@@ -3119,6 +3119,13 @@ class ColoScript2(object):
                 )
                 self.queue_game.put(box.row(row))
 
+            # Manually add in Terra so a player knows about it,
+            # Since we now support Terra being TO or FROM.
+            terra = row = "{0}{1:^3} {2:6} {3}{4:29} {0}{5:2} ".format(
+                c1, 1, 1, c2, "Terra", " "
+            )
+            self.send2player(box.row(terra))
+
             for s in sorted(self.planets.keys()):
                 planet_output(
                     s,
@@ -3128,7 +3135,6 @@ class ColoScript2(object):
                 )
 
             self.queue_game.put(box.bottom())
-
             ask = PlayerInput(self.game)
             d = ask.prompt("To: ", 3, name="planet", digits=True)
             d.addCallback(self.to_chosen)