home · contact · privacy
In web client, enable keyboard control except if in outer HTML input field.
[plomrogue2] / rogue_chat_curses.py
index 7145101e2fbba7a44cab367d8f01d0ac907fe31e..d76c3bebd0b41622a41d3191b8db20836e989f8d 100755 (executable)
@@ -173,6 +173,12 @@ def cmd_TURN(game, n):
     game.turn_complete = False
 cmd_TURN.argtypes = 'int:nonneg'
 
+def cmd_PSEUDO_FOV_WIPE(game):
+    game.portals_new = {}
+    game.annotations_new = {}
+    game.things_new = []
+cmd_PSEUDO_FOV_WIPE.argtypes = ''
+
 def cmd_LOGIN_OK(game):
     game.tui.switch_mode('post_login_wait')
     game.tui.send('GET_GAMESTATE')
@@ -268,20 +274,17 @@ def cmd_MAP_CONTROL(game, content):
 cmd_MAP_CONTROL.argtypes = 'string'
 
 def cmd_GAME_STATE_COMPLETE(game):
-    game.turn_complete = True
     game.tui.do_refresh = True
     game.tui.info_cached = None
     game.things = game.things_new
-    game.things_new = []
     game.portals = game.portals_new
-    game.portals_new = {}
     game.annotations = game.annotations_new
-    game.annotations_new = {}
     game.fov = game.fov_new
     game.map_geometry = game.map_geometry_new
     game.map_content = game.map_content_new
     game.map_control_content = game.map_control_content_new
     game.player = game.get_thing(game.player_id)
+    game.turn_complete = True
     if game.tui.mode.name == 'post_login_wait':
         game.tui.switch_mode('play')
 cmd_GAME_STATE_COMPLETE.argtypes = ''
@@ -364,6 +367,7 @@ class Game(GameBase):
         self.register_command(cmd_REPLY)
         self.register_command(cmd_PLAYER_ID)
         self.register_command(cmd_TURN)
+        self.register_command(cmd_PSEUDO_FOV_WIPE)
         self.register_command(cmd_THING)
         self.register_command(cmd_THING_TYPE)
         self.register_command(cmd_THING_NAME)