예제 #1
0
 def collect_save_data(self, data):
     level_set_path = self.playing_level_dir
     if level_set_path == self.get_std_level_dir():
         level_set_path = ""
     data['level_set_path'] = level_set_path
     data['levels_completed'] = self.levels_completed
     HGame.collect_save_data(self, data)
예제 #2
0
    def new_game(self):
        """Prepare for a new game by discarding the current level, clearing the
		list of completed levels and saved game file name."""
        self.stop_level()
        self.level = None
        del self.levels_completed[:]
        HGame.new_game(self)
예제 #3
0
파일: hlgame.py 프로젝트: wolmir/cristina
	def collect_save_data(self, data):
		level_set_path = self.playing_level_dir
		if level_set_path == self.get_std_level_dir():
			level_set_path = ""
		data['level_set_path'] = level_set_path
		data['levels_completed'] = self.levels_completed
		HGame.collect_save_data(self, data)
예제 #4
0
파일: hlgame.py 프로젝트: wolmir/cristina
	def new_game(self):
		"""Prepare for a new game by discarding the current level, clearing the
		list of completed levels and saved game file name."""
		self.stop_level()
		self.level = None
		del self.levels_completed[:]
		HGame.new_game(self)
예제 #5
0
 def restore_save_data(self, data):
     level_set_path = data.pop('level_set_path')
     if not level_set_path:
         level_set_path = self.get_std_level_dir()
     if not os.path.exists(level_set_path):
         level_set_path = self.look_for_level_set(level_set_path)
         if not level_set_path:
             raise Cancel
     self.stop_level()
     self.level = None
     self.set_playing_level_dir(level_set_path)
     HGame.restore_save_data(self, data)
예제 #6
0
파일: hlgame.py 프로젝트: wolmir/cristina
	def restore_save_data(self, data):
		level_set_path = data.pop('level_set_path')
		if not level_set_path:
			level_set_path = self.get_std_level_dir()
		if not os.path.exists(level_set_path):
			level_set_path = self.look_for_level_set(level_set_path)
			if not level_set_path:
				raise Cancel
		self.stop_level()
		self.level = None
		self.set_playing_level_dir(level_set_path)
		HGame.restore_save_data(self, data)
예제 #7
0
    def save_game(self, path):
        """Saves current game progress in the specified file. If a non-standard
		level set is being played, the pathname of the level set is also
		recorded in the saved game file."""
        HGame.save_game(self, path)
예제 #8
0
    def load_game(self, path):
        """Restores current level set and saved game progress from the specified
		file. If the level set can't be found, the user will be asked to look
		for it."""
        HGame.load_game(self, path)
예제 #9
0
파일: hlgame.py 프로젝트: wolmir/cristina
	def save_game(self, path):
		"""Saves current game progress in the specified file. If a non-standard
		level set is being played, the pathname of the level set is also
		recorded in the saved game file."""
		HGame.save_game(self, path)
예제 #10
0
파일: hlgame.py 프로젝트: wolmir/cristina
	def load_game(self, path):
		"""Restores current level set and saved game progress from the specified
		file. If the level set can't be found, the user will be asked to look
		for it."""
		HGame.load_game(self, path)