From: Christian Heller Date: Sun, 21 Feb 2016 11:24:43 +0000 (+0100) Subject: Client: Fix bugs in plugin infrastructure. X-Git-Tag: tce~193 X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%22https:/validator.w3.org/%7B%7Btodo.comment%7D%7D?a=commitdiff_plain;h=fad0798fc0212ad2b4b93443f7c8de970f3d760d;p=plomrogue Client: Fix bugs in plugin infrastructure. --- diff --git a/client/window_management.py b/client/window_management.py index 9a50b29..610764b 100644 --- a/client/window_management.py +++ b/client/window_management.py @@ -95,6 +95,8 @@ def set_windows(): curses.endwin() stdscr = curses.initscr() screen_size = stdscr.getmaxyx() + global windows + windows = [] for config in windows_config: size = size_window(config["config"]) window = Window(config["title"], config["func"], size) diff --git a/roguelike-client b/roguelike-client index ed0ab74..4514946 100755 --- a/roguelike-client +++ b/roguelike-client @@ -89,7 +89,7 @@ def read_message_queue(): redraw_windows = True elif message == "WORLD_UPDATED": query_mapcell() - elif message == "PLUGIN": + elif message[:6] == "PLUGIN": str_plugin = message[7:] if (str_plugin.replace("_", "").isalnum() and os.access("plugins/client/" + str_plugin + ".py",