def save(self, savegamename=None): self.ingame_gui.open_popup( T("Not possible"), T("Save/load for multiplayer games is not possible yet")) return #TODO disabled for now, see #2151 for details if savegamename is None: def sanity_checker(string): try: SavegameManager.create_multiplayersave_filename(string) except RuntimeError: return False else: return True sanity_criteria = T( "The filename must consist only of letters, numbers, spaces " "and these characters: _ . -") savegamename = self.ingame_gui.show_select_savegame( mode='mp_save', sanity_checker=sanity_checker, sanity_criteria=sanity_criteria) if savegamename is None: return True # user aborted dialog SaveCommand(savegamename).execute(self) return True
def quicksave(self): self.ingame_gui.open_popup( T("Not possible"), T("Save/load for multiplayer games is not possible yet")) return #TODO disabled for now, see #2151 for details SaveCommand( SavegameManager.create_multiplayer_quicksave_name()).execute(self)
def save(self, savegamename=None): if savegamename is None: def sanity_checker(string): try: SavegameManager.create_multiplayersave_filename(string) except RuntimeError: return False else: return True sanity_criteria = _("The filename must consist only of letters, numbers, spaces and _.-") savegamename = self.gui.show_select_savegame(mode='mp_save', sanity_checker=sanity_checker, sanity_criteria=sanity_criteria) if savegamename is None: return True # user aborted dialog SaveCommand( savegamename ).execute(self) return True
def quicksave(self): SaveCommand( SavegameManager.create_multiplayer_quicksave_name()).execute(self)