示例#1
0
    def onPreSave(self, argsList):
        """
		Save reminders.
		"""
        if self.reminders.isEmpty():
            SdToolKit.sdDelGlobal(SD_MOD_ID, SD_QUEUES_ID)
        else:
            SdToolKit.sdSetGlobal(SD_MOD_ID, SD_QUEUES_ID, self.reminders)
	def onPreSave(self, argsList):
		"""
		Save reminders.
		"""
		if self.reminders.isEmpty():
			SdToolKit.sdDelGlobal(SD_MOD_ID, SD_QUEUES_ID)
		else:
			SdToolKit.sdSetGlobal(SD_MOD_ID, SD_QUEUES_ID, self.reminders)
示例#3
0
    def onLoadGame(self, argsList):
        """
		Load saved reminders.
		"""
        self.clearReminders()
        queues = SdToolKit.sdGetGlobal(SD_MOD_ID, SD_QUEUES_ID)
        if queues:
            self.setReminders(queues)
        else:
            # check for old save format (single queue)
            queue = SdToolKit.sdGetGlobal(SD_MOD_ID, SD_QUEUE_ID)
            if queue:
                BugUtil.info("Reminder - Converting single-queue format")
                self.setReminders(Reminders(queue))
                SdToolKit.sdDelGlobal(SD_MOD_ID, SD_QUEUE_ID)
	def onLoadGame(self, argsList):
		"""
		Load saved reminders.
		"""
		self.clearReminders()
		queues = SdToolKit.sdGetGlobal(SD_MOD_ID, SD_QUEUES_ID)
		if queues:
			self.setReminders(queues)
		else:
			# check for old save format (single queue)
			queue = SdToolKit.sdGetGlobal(SD_MOD_ID, SD_QUEUE_ID)
			if queue:
				BugUtil.info("Reminder - Converting single-queue format")
				self.setReminders(Reminders(queue))
				SdToolKit.sdDelGlobal(SD_MOD_ID, SD_QUEUE_ID)
 def onPreSave(self, argsList):
     if self.reminders.isEmpty():
         SdToolKit.sdDelGlobal("Reminders", "queues")
     else:
         SdToolKit.sdSetGlobal("Reminders", "queues", self.reminders)