+ if self.draw_face and self.mode.name in {'chat', 'play'}:
+ draw_face_popup()
+
+ def pick_selectable(task_name):
+ try:
+ i = int(self.input_)
+ if i < 0 or i >= len(self.selectables):
+ self.log_msg('? invalid index, aborted')
+ else:
+ self.send('TASK:%s %s' % (task_name, self.selectables[i]))
+ except ValueError:
+ self.log_msg('? invalid index, aborted')
+ self.input_ = ''
+ self.switch_mode('play')
+
+ def enter_ascii_art(command):
+ if len(self.input_) > 6:
+ self.log_msg('? wrong input length, must be max 6; try again')
+ return
+ if len(self.input_) < 6:
+ self.input_ += ' ' * (6 - len(self.input_))
+ self.log_msg(' ' + self.input_)
+ self.full_ascii_draw += self.input_
+ self.ascii_draw_stage += 1
+ if self.ascii_draw_stage < 3:
+ self.restore_input_values()
+ else:
+ self.send('%s %s' % (command, quote(self.full_ascii_draw)))
+ self.full_ascii_draw = ""
+ self.ascii_draw_stage = 0
+ self.input_ = ""
+ self.switch_mode('edit')