def loadAll(load_name): global system_list global planet_list global ship_list global crew_list global game_folder makePartsList() path_to_load = game_folder + '/' + 'Save' + '/' + str(load_name) file_to_read = open(path_to_load + '/' + 'system', 'r') tmp = [] for line in file_to_read: tmp.append(line.split(':')[1]) if line.split(':')[0] == 'state': system = System() system.load(tmp) system_list.append(system) tmp = [] file_to_read.close() file_to_read = open(path_to_load + '/' + 'planet', 'r') tmp = [] for line in file_to_read: tmp.append(line.split(':')[1]) if line.split(':')[0] == 'resourse': planet = Planet() planet.load(tmp) planet_list.append(planet) tmp = [] file_to_read.close() file_to_read = open(path_to_load + '/' + 'ship', 'r') tmp = [] for line in file_to_read: tmp.append(line.split(':')[1]) if line.split(':')[0] == 'spot': ship = Ship() ship.load(tmp) ship_list.append(ship) tmp = [] file_to_read.close() file_to_read = open(path_to_load + '/' + 'crew', 'r') tmp = [] for line in file_to_read: tmp.append(line.split(':')[1]) if line.split(':')[0] == 'weapon': crew = Crew() crew.load(tmp) crew_list.append(crew) tmp = [] file_to_read.close() gui.paintWindowGalaxy()