|
@@ -93,7 +93,9 @@ class PlayerInput(object):
|
|
|
self.keep = {}
|
|
|
|
|
|
# default colors
|
|
|
+ # prompt
|
|
|
self.c = merge(Style.BRIGHT + Fore.WHITE + Back.BLUE)
|
|
|
+ # input
|
|
|
self.cp = merge(Style.BRIGHT + Fore.YELLOW + Back.BLUE)
|
|
|
|
|
|
# useful constants
|
|
@@ -561,7 +563,7 @@ class ScriptPort(object):
|
|
|
self.observer.connect("game-line", self.game_line)
|
|
|
|
|
|
self.defer = None
|
|
|
- self.send2player("Script based on: Port Pair Trading v2.00")
|
|
|
+ self.send2player(self.r + "Script based on: Port Pair Trading v2.00" + self.nl)
|
|
|
|
|
|
self.possible_sectors = None
|
|
|
|
|
@@ -2399,8 +2401,6 @@ class ProxyMenu(object):
|
|
|
self.queue_game.put(box.bottom())
|
|
|
self.queue_game.put(" " + tc + "-=>" + self.r + " ")
|
|
|
|
|
|
-
|
|
|
-
|
|
|
def deactivate_scripts_menu(self, *data):
|
|
|
log.warn("deactivate_scripts_menu ({0})".format(data))
|
|
|
self.observer.disconnect("player", self.scripts_player)
|
|
@@ -2458,8 +2458,10 @@ class ProxyMenu(object):
|
|
|
self.queue_game.put(box.row(row))
|
|
|
|
|
|
menu_item("1", "Ports (Trades between two sectors)")
|
|
|
+ menu_item("!", "Terrorize Ports/Trades")
|
|
|
menu_item("2", "Explore (Strange new sectors)")
|
|
|
- menu_item("3", "Space... the final frontier...")
|
|
|
+ menu_item("3", "Space... the broken script...")
|
|
|
+ menu_item("4", "Upgrade Planet")
|
|
|
menu_item("X", "eXit")
|
|
|
self.queue_game.put(box.bottom())
|
|
|
self.queue_game.put(" " + c1 + "-=>" + self.r + " ")
|
|
@@ -2494,6 +2496,9 @@ class ProxyMenu(object):
|
|
|
elif key == '!':
|
|
|
self.queue_game.put(self.c + key + self.r + self.nl)
|
|
|
ask = PlayerInput(self.game)
|
|
|
+ # This is TERROR, so do something!
|
|
|
+ ask.color(merge(Style.BRIGHT + Fore.WHITE + Back.RED))
|
|
|
+ ask.colorp(merge(Style.BRIGHT + Fore.YELLOW + Back.RED))
|
|
|
d = ask.prompt("How many loops of terror?", 4, name="loops", digits=True, abort_blank=True)
|
|
|
d.addCallback(self.terror, ask)
|
|
|
return
|
|
@@ -2512,6 +2517,9 @@ class ProxyMenu(object):
|
|
|
d.addCallback(self.deactivate_scripts_menu)
|
|
|
d.addErrback(self.deactivate_scripts_menu)
|
|
|
return
|
|
|
+ elif key == '4':
|
|
|
+ self.queue_game.put(self.c + key + self.r + self.nl)
|
|
|
+ # NNY.
|
|
|
elif key == 'X':
|
|
|
self.queue_game.put(self.c + key + self.r + self.nl)
|
|
|
self.deactivate_scripts_menu()
|