home · contact · privacy
Client: Fix broken "things here" window scrolling command.
authorChristian Heller <c.heller@plomlompom.de>
Fri, 26 Feb 2016 20:05:21 +0000 (21:05 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Fri, 26 Feb 2016 20:05:21 +0000 (21:05 +0100)
client/commands.py

index c1d61419dd8edb997394ba1d837abe2ebea283b4..d86346f29b38caa30621e807b2e52d1ac39a346b 100644 (file)
@@ -66,8 +66,15 @@ def command_looker(string):
 
 def command_look_scroller(string):
     def command_look_scroll():
-        win_size = next(win["size"] for win in windows
-                                    if win["func"] == win_look)
+        from client.window_management import windows
+        from client.config.windows import windows_config
+        from client.windows import win_look
+        try:
+            i = next(i for i in range(len(windows_config))
+                        if windows_config[i]["func"] == win_look)
+        except StopIteration:
+            return
+        win_size = windows[i].size
         if string == "up" and world_data["look_scroll"] > 0:
             world_data["look_scroll"] -= 1
         elif string == "down" and world_data["look_scroll"] \