From: Christian Heller Date: Fri, 11 Dec 2020 06:23:14 +0000 (+0100) Subject: Fix face pop-ups on non-faces. X-Git-Url: https://plomlompom.com/repos/feed.xml?a=commitdiff_plain;ds=sidebyside;h=075ed2b9529e52ab8a5075d56d77e09d2191d9c7;hp=b3274c1e3219d50cc67487684608c7b4bd456675;p=plomrogue2 Fix face pop-ups on non-faces. --- 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