- if 'MOVE' in self.game.tasks:
- content += "[%s] – move player\n" % ','.join(self.movement_keys)
- if 'PICK_UP' in self.game.tasks:
- content += "[%s] – pick up thing\n" % self.keys['take_thing']
- if 'DROP' in self.game.tasks:
- content += "[%s] – drop thing\n" % self.keys['drop_thing']
- content += '[%s] – teleport\n' % self.keys['teleport']
- content += '\n'
- elif self.mode.name == 'study':
- content += 'Available actions:\n'
- content += '[%s] – move question mark\n' % ','.join(self.movement_keys)
- content += '[%s] – toggle map view\n' % self.keys['toggle_map_mode']
- content += '\n'
- elif self.mode.name == 'edit':
- content += "Available actions:\n"
- if 'FLATTEN_SURROUNDINGS' in self.game.tasks:
- content += "[%s] – flatten surroundings\n" % self.keys['flatten']
- content += '\n'
- elif self.mode.name == 'control_tile_draw':
- content += "Available actions:\n"
- content += "[%s] – toggle tile control drawing\n" % self.keys['toggle_tile_draw']
+ for action in self.mode.available_actions:
+ if action in action_tasks:
+ if action_tasks[action] not in self.game.tasks:
+ continue
+ if action == 'move_explorer':
+ action = 'move'
+ if action == 'move':
+ key = ','.join(self.movement_keys)
+ else:
+ key = self.keys[action]
+ content += '[%s] – %s\n' % (key, action_descriptions[action])