コード例 #1
0
 def __onPiggyBankCreditsChanged(self, credits_=None):
     config = self.__lobbyContext.getServerSettings().getPiggyBankConfig()
     maxAmount = config.get('threshold', PiggyBankConstants.MAX_AMOUNT)
     data = self.__itemsCache.items.stats.piggyBank
     if credits_ >= maxAmount:
         timeLeft = time_formatters.getTillTimeByResource(getDeltaTimeHelper(config, data), R.strings.premacc.piggyBankCard.timeLeft)
         SystemMessages.pushMessage(priority=NotificationPriorityLevel.MEDIUM, text=backport.text(R.strings.system_messages.piggyBank.piggyBankFull(), timeValue=timeLeft))
コード例 #2
0
 def _getDeltaTime(self):
     return 0 if not self._config or not self._data else getDeltaTimeHelper(
         self._config, self._data)
 def _getDeltaTime(self):
     serverSettings = self._lobbyContext.getServerSettings()
     config = serverSettings.getPiggyBankConfig()
     data = self._itemsCache.items.stats.piggyBank
     return getDeltaTimeHelper(config, data)
コード例 #4
0
 def _updateTimeToOpen(self):
     timeToOpen = getDeltaTimeHelper(self._creditReserveConfig,
                                     self._creditReserveInfo)
     self.viewModel.setTimeToOpen(timeToOpen)