def autosave(self): """Called automatically in an interval""" self.log.debug("Session: autosaving") success = self._do_save(SavegameManager.create_autosave_filename()) if success: SavegameManager.delete_dispensable_savegames(autosaves=True) self.ingame_gui.message_widget.add('AUTOSAVE')
def autosave(self): """Called automatically in an interval""" self.log.debug("Session: autosaving") # call saving through horizons.main and not directly through session, so that save errors are handled success = self.save(SavegameManager.create_autosave_filename()) if success: SavegameManager.delete_dispensable_savegames(autosaves=True)
def autosave(self): """Called automatically in an interval""" self.log.debug("Session: autosaving") # call saving through horizons.main and not directly through session, so that save errors are handled success = self.save(SavegameManager.create_autosave_filename()) if success: SavegameManager.delete_dispensable_savegames(autosaves = True)
def autosave(self): """Called automatically in an interval""" if self.in_editor_mode(): return self.log.debug("Session: autosaving") success = self._do_save(SavegameManager.create_autosave_filename()) if success: SavegameManager.delete_dispensable_savegames(autosaves=True) self.ingame_gui.message_widget.add(point=None, string_id="AUTOSAVE")
def quicksave(self): """Called when user presses the quicksave hotkey""" self.log.debug("Session: quicksaving") # call saving through horizons.main and not directly through session, so that save errors are handled success = self.save(SavegameManager.create_quicksave_filename()) if success: self.ingame_gui.message_widget.add(None, None, 'QUICKSAVE') SavegameManager.delete_dispensable_savegames(quicksaves=True) else: self.gui.show_popup(_('Error'), _('Failed to quicksave.'))
def quicksave(self): """Called when user presses the quicksave hotkey""" self.log.debug("Session: quicksaving") # call saving through horizons.main and not directly through session, so that save errors are handled success = self.save(SavegameManager.create_quicksave_filename()) if success: self.ingame_gui.message_widget.add(None, None, 'QUICKSAVE') SavegameManager.delete_dispensable_savegames(quicksaves = True) else: self.gui.show_popup(_('Error'), _('Failed to quicksave.'))
def autosave(self): """Called automatically in an interval""" if self.in_editor_mode(): return self.log.debug("Session: autosaving") success = self._do_save(SavegameManager.create_autosave_filename()) if success: SavegameManager.delete_dispensable_savegames(autosaves=True) self.ingame_gui.message_widget.add(point=None, string_id='AUTOSAVE')
def quicksave(self): """Called when user presses the quicksave hotkey""" self.log.debug("Session: quicksaving") # call saving through horizons.main and not directly through session, so that save errors are handled success = self._do_save(SavegameManager.create_quicksave_filename()) if success: SavegameManager.delete_dispensable_savegames(quicksaves=True) self.ingame_gui.message_widget.add('QUICKSAVE') else: headline = _("Failed to quicksave.") descr = _("An error happened during quicksave.") + u"\n" + _("Your game has not been saved.") advice = _("If this error happens again, please contact the development team: " "{website}").format(website="http://unknown-horizons.org/support/") self.ingame_gui.open_error_popup(headline, descr, advice)
def quicksave(self): """Called when user presses the quicksave hotkey""" self.log.debug("Session: quicksaving") # call saving through horizons.main and not directly through session, so that save errors are handled success = self._do_save(SavegameManager.create_quicksave_filename()) if success: SavegameManager.delete_dispensable_savegames(quicksaves=True) self.ingame_gui.message_widget.add('QUICKSAVE') else: headline = T("Failed to quicksave.") descr = T("An error happened during quicksave.") + "\n" + T("Your game has not been saved.") advice = T("If this error happens again, please contact the development team: " "{website}").format(website="http://unknown-horizons.org/support/") self.ingame_gui.open_error_popup(headline, descr, advice)
def quicksave(self): """Called when user presses the quicksave hotkey""" self.log.debug("Session: quicksaving") # call saving through horizons.main and not directly through session, so that save errors are handled success = self.save(SavegameManager.create_quicksave_filename()) if success: self.ingame_gui.message_widget.add(None, None, 'QUICKSAVE') SavegameManager.delete_dispensable_savegames(quicksaves=True) else: headline = _(u"Failed to quicksave.") descr = _( u"An error happened during quicksave. Your game has not been saved." ) advice = _(u"If this error happens again, please contact the development team:") + \ u"unknown-horizons.org/support/" self.gui.show_error_popup(headline, descr, advice)
def quicksave(self): """Called when user presses the quicksave hotkey""" if self.in_editor_mode(): return self.log.debug("Session: quicksaving") # call saving through horizons.main and not directly through session, so that save errors are handled success = self._do_save(SavegameManager.create_quicksave_filename()) if success: SavegameManager.delete_dispensable_savegames(quicksaves = True) self.ingame_gui.message_widget.add(point=None, string_id='QUICKSAVE') else: headline = _(u"Failed to quicksave.") descr = _(u"An error happened during quicksave. Your game has not been saved.") advice = _(u"If this error happens again, please contact the development team:") + \ u"unknown-horizons.org/support/" self.gui.show_error_popup(headline, descr, advice)