X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=rogue_chat_curses.py;h=fdfc2bcbfb12096dd8b36148f48b2b63454242d8;hb=075ed2b9529e52ab8a5075d56d77e09d2191d9c7;hp=28588928314991db4b16dcfe2ee77bc0646d908d;hpb=c4a74406fd9fc0f7d91ad428a9c28b5369e5c51a;p=plomrogue2 diff --git a/rogue_chat_curses.py b/rogue_chat_curses.py index 2858892..fdfc2bc 100755 --- a/rogue_chat_curses.py +++ b/rogue_chat_curses.py @@ -549,7 +549,6 @@ class TUI: self.fov = '' self.flash = False self.map_lines = [] - self.draw_face = False self.offset = YX(0,0) curses.wrapper(self.loop) @@ -644,6 +643,7 @@ class TUI: if self.mode and self.mode.name == 'control_tile_draw': self.log_msg('@ finished tile protection drawing.') + self.draw_face = False self.tile_draw = False if mode_name == 'command_thing' and\ (not self.game.player.carrying or @@ -966,22 +966,23 @@ 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 + start_x = self.window_width - 10 def draw_body_part(body_part, end_y): - start_x = self.window_width - 10 - safe_addstr(end_y - 4, start_x, '+--------+') + safe_addstr(end_y - 4, start_x, ' ________ ') safe_addstr(end_y - 3, start_x, '| |') safe_addstr(end_y - 2, start_x, '| ' + body_part[0:6] + ' |') safe_addstr(end_y - 1, start_x, '| ' + body_part[6:12] + ' |') safe_addstr(end_y, start_x, '| ' + body_part[12:18] + ' |') if hasattr(t, 'face'): - draw_body_part(t.face, self.size.y - 1) + draw_body_part(t.face, self.size.y - 2) if hasattr(t, 'hat'): - draw_body_part(t.hat, self.size.y - 4) + draw_body_part(t.hat, self.size.y - 5) + safe_addstr(self.size.y - 1, start_x, '| |') def draw_help(): content = "%s help\n\n%s\n\n" % (self.mode.short_desc,