home · contact · privacy
Fix face pop-ups on non-faces.
authorChristian Heller <c.heller@plomlompom.de>
Fri, 11 Dec 2020 06:23:14 +0000 (07:23 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Fri, 11 Dec 2020 06:23:14 +0000 (07:23 +0100)
rogue_chat.html
rogue_chat_curses.py

index 781fc63b99f7e0618922a7b9088136f540e7353e..ba49e868e16dcf77f7856e757d100e0338af2157 100644 (file)
@@ -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;
       }
index 983a4221c3508b5383a32bd69497061d3cf9bd1d..fdfc2bcbfb12096dd8b36148f48b2b63454242d8 100755 (executable)
@@ -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