+ def draw_help():
+ content = "%s mode help\n\n%s\n\n" % (self.mode.name,
+ self.mode.help_intro)
+ if self.mode == self.mode_play:
+ content += "Available actions:\n"
+ if 'MOVE' in self.game.tasks:
+ content += "[%s] – move player\n" % ','.join(self.movement_keys)
+ if 'FLATTEN_SURROUNDINGS' in self.game.tasks:
+ content += "[%s] – flatten player's surroundings\n" % self.keys['flatten']
+ content += 'Other modes available from here:\n'
+ content += '[%s] – chat mode\n' % self.keys['switch_to_chat']
+ content += '[%s] – study mode\n' % self.keys['switch_to_study']
+ content += '[%s] – terrain edit mode\n' % self.keys['switch_to_edit']
+ content += '[%s] – portal edit mode\n' % self.keys['switch_to_portal']
+ content += '[%s] – annotation mode\n' % self.keys['switch_to_annotate']
+ content += '[%s] – password input mode\n' % self.keys['switch_to_password']
+ elif self.mode == self.mode_study:
+ content += 'Available actions:\n'
+ content += '[%s] – move question mark\n' % ','.join(self.movement_keys)
+ content += '[%s] – toggle view between terrain, and password protection areas\n' % self.keys['toggle_map_mode']
+ content += '\n\nOther modes available from here:'
+ content += '[%s] – chat mode\n' % self.keys['switch_to_chat']
+ content += '[%s] – play mode\n' % self.keys['switch_to_play']
+ elif self.mode == self.mode_chat:
+ content += '/nick NAME – re-name yourself to NAME\n'
+ content += '/msg USER TEXT – send TEXT to USER\n'
+ content += '/%s or /play – switch to play mode\n' % self.keys['switch_to_play']
+ content += '/%s or /study – switch to study mode\n' % self.keys['switch_to_study']
+ for i in range(self.size.y):
+ safe_addstr(i,
+ self.window_width * (not self.mode.has_input_prompt),
+ ' '*self.window_width)
+ lines = []
+ for line in content.split('\n'):
+ lines += msg_into_lines_of_width(line, self.window_width)
+ for i in range(len(lines)):
+ if i >= self.size.y:
+ break
+ safe_addstr(i,
+ self.window_width * (not self.mode.has_input_prompt),
+ lines[i])
+