def open_level_set_cmd(self): """Implementation of the 'Play Custom Levels' command.""" self.ask_save() path = request_old_filename(suffixes = [self.game.level_set_suffix], directory = self.game.get_custom_level_set_dir()) if not path: raise Cancel self.load_level_set(path) self.restart_level()
def load_game_cmd(self): """Implementation of the 'Load Game' command.""" game = self.game self.ask_save() dir = game.get_save_dir() path = request_old_filename(suffixes = [game.save_file_suffix], directory = dir) if not path: raise Cancel self.restore_game(path)
def load_game_cmd(self): """Implementation of the 'Load Game' command.""" game = self.game self.ask_save() dir = game.get_save_dir() path = request_old_filename(suffixes=[game.save_file_suffix], directory=dir) if not path: raise Cancel self.restore_game(path)
def open_level_set_cmd(self): """Implementation of the 'Play Custom Levels' command.""" self.ask_save() path = request_old_filename( suffixes=[self.game.level_set_suffix], directory=self.game.get_custom_level_set_dir() ) if not path: raise Cancel self.load_level_set(path) self.restart_level()
def open_level_cmd(self): """Implementation of the 'Open Level' command.""" game = self.game path = request_old_filename(suffixes = [game.level_file_suffix], directory = game.get_level_save_dir()) if path: if self.load_level_file(path): self.show_editor_screen() return True return False