Beispiel #1
0
 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 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)
Beispiel #4
0
	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)
Beispiel #5
0
 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)