From 075ed2b9529e52ab8a5075d56d77e09d2191d9c7 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Fri, 11 Dec 2020 07:23:14 +0100 Subject: [PATCH] Fix face pop-ups on non-faces. --- rogue_chat.html | 2 +- rogue_chat_curses.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rogue_chat.html b/rogue_chat.html index 781fc63..ba49e86 100644 --- a/rogue_chat.html +++ b/rogue_chat.html @@ -1134,7 +1134,7 @@ let tui = { }, draw_face_popup: function() { const t = game.things[this.draw_face]; - if (!t) { + if (!t || !t.face) { this.draw_face = false; return; } diff --git a/rogue_chat_curses.py b/rogue_chat_curses.py index 983a422..fdfc2bc 100755 --- a/rogue_chat_curses.py +++ b/rogue_chat_curses.py @@ -966,7 +966,7 @@ class TUI: def draw_face_popup(): t = self.game.get_thing(self.draw_face) - if not t: + if not t or not hasattr(t, 'face'): self.draw_face = False return -- 2.30.2