From: Christian Heller Date: Fri, 26 Feb 2016 20:05:21 +0000 (+0100) Subject: Client: Fix broken "things here" window scrolling command. X-Git-Tag: tce~138 X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Bprefix%7D%7D/static/process?a=commitdiff_plain;h=92d13d6d26fd7df2b84af81ea8ca8a6ffadf12ad;p=plomrogue Client: Fix broken "things here" window scrolling command. --- diff --git a/client/commands.py b/client/commands.py index c1d6141..d86346f 100644 --- a/client/commands.py +++ b/client/commands.py @@ -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"] \