def getCustomTitle(self): titleData = self._data.get('title') if titleData: if 'key' in titleData: return i18n.makeString(titleData['key'], value=_getCustomTitleValueFromConditionData(self._data)) return getLocalizedData(self._data, 'title') else: return None
def getCustomTitle(self): titleData = self._data.get('title') if titleData: if 'key' in titleData: return i18n.makeString(titleData['key']) return getLocalizedData(self._data, 'title') else: return None
def getCustomDescription(self): descrData = self._data.get('description') if descrData: if 'key' in descrData: return i18n.makeString(descrData['key']) return getLocalizedData(self._data, 'description') else: return None
def __processNotifications(self, notifications, state): for notification in notifications: text = getLocalizedData(notification, 'text') msgType = notification.get('type', None) if msgType is not None and not msgType.startswith(self.__CMD_BLOCK_PREFIX) and not msgType.startswith(self.__PROMO_BLOCK_PREFIX) and text: message = {'data': text, 'type': msgType, 'state': state} self.proto.serviceChannel.pushClientMessage(message, SCH_CLIENT_MSG_TYPE.ACTION_NOTIFY_TYPE)
def __processNotifications(self, notifications, state): if game_control.g_instance.roaming.isInRoaming(): return else: for notification in notifications: text = getLocalizedData(notification, 'text') msgType = notification.get('type', None) if msgType is not None and msgType[:len(self.__BLOCK_PREFIX)] != self.__BLOCK_PREFIX and len(text) > 0: message = {'data': text, 'type': msgType, 'state': state} self.proto.serviceChannel.pushClientMessage(message, SCH_CLIENT_MSG_TYPE.ACTION_NOTIFY_TYPE) return
def __processNotifications(self, notifications, state): if game_control.g_instance.roaming.isInRoaming(): return else: for notification in notifications: text = getLocalizedData(notification, 'text') msgType = notification.get('type', None) if msgType is not None and msgType[:len( self.__BLOCK_PREFIX)] != self.__BLOCK_PREFIX and len( text) > 0: message = {'data': text, 'type': msgType, 'state': state} self.proto.serviceChannel.pushClientMessage( message, SCH_CLIENT_MSG_TYPE.ACTION_NOTIFY_TYPE) return
def getLongDescription(self): return getLocalizedData(self._data['localized_data'], 'longDescr')
def getUserName(self): return getLocalizedData(self._data['localized_data'], 'title')
def getRequirementsStr(self): return getLocalizedData(self._data, 'requirements')
def getSideUserName(self, side): return getLocalizedData(self._data['localized_data'], 'sideNames').get(side)
def getUserName(self): return getLocalizedData(self._data, 'name')
def getAwardMsg(self): return getLocalizedData(self._data, 'congratulation')
def getSideUserName(self, side): return getLocalizedData(self._data["localized_data"], "sideNames").get(side)
def getLongDescription(self): return getLocalizedData(self._data["localized_data"], "longDescr")
def getUserName(self): return getLocalizedData(self._data["localized_data"], "title")
def getNotificationText(self): return getLocalizedData(self._data, 'notificationText')
def formatValue(self): return getLocalizedData({'value': self._value}, 'value')
def getTips(self): return getLocalizedData(self._data, 'advice')
def make(cls, data): text = getLocalizedData(data, 'text') return cls.__new__(cls, data['type'], data.get('data'), text)
def getDescription(self): return getLocalizedData(self._data, 'description')
def _parse(self): return getLocalizedData({'value': self._value}, 'value')