+ draw_face_popup: function() {
+ const t = game.things[this.draw_face];
+ if (!t) {
+ this.draw_face = false;
+ return;
+ }
+ function draw_body_part(body_part, end_y) {
+ const start_x = tui.window_width - 10;
+ terminal.write(end_y - 4, start_x, '+--------+');
+ terminal.write(end_y - 3, start_x, '| |');
+ terminal.write(end_y - 2, start_x, '| ' + body_part.slice(0, 6) + ' |');
+ terminal.write(end_y - 1, start_x, '| ' + body_part.slice(6, 12) + ' |');
+ terminal.write(end_y, start_x, '| ' + body_part.slice(12, 18) + ' |');
+ }
+ if (t.face) {
+ draw_body_part(t.face, terminal.rows - 1);
+ }
+ if (t.hat) {
+ draw_body_part(t.hat, terminal.rows - 4);
+ }
+ },