def buildList(self, prebattles): self.__list = [] for item in prebattles: self.__list.append({'prbID': item.prbID, 'creatorName': item.getCreatorFullName(), 'comment': item.getCensoredComment(), 'playersCount': item.playersCount, 'division': getCompanyDivisionString(item.getDivisionName()), 'players': []})
def getDivisionsList(addAll = True): result = [] if addAll: result.append({'data': 0, 'label': i18n.makeString('#prebattle:labels/company/division/ALL')}) for divID in PREBATTLE_COMPANY_DIVISION.RANGE: divName = PREBATTLE_COMPANY_DIVISION_NAMES[divID] result.append({'data': divID, 'label': getCompanyDivisionString(divName)}) return result
def buildList(self, prebattles): self.__list = [] for item in prebattles: self.__list.append({'prbID': item.prbID, 'creatorName': item.creator, 'creatorClan': item.clanAbbrev, 'creatorIgrType': item.creatorIgrType, 'creatorRegion': g_lobbyContext.getRegionCode(item.creatorDbId), 'comment': item.getCensoredComment(), 'playersCount': item.playersCount, 'division': getCompanyDivisionString(item.getDivisionName()), 'players': []})
def getDivisionsList(addAll = True): result = [] if addAll: result.append({'data': 0, 'label': i18n.makeString('#prebattle:labels/company/division/ALL')}) isEventEnabled = g_eventsCache.isEventEnabled() for divID in PREBATTLE_COMPANY_DIVISION.RANGE: if divID in PREBATTLE_COMPANY_DIVISION.EVENT_ONLY and not isEventEnabled: continue divName = PREBATTLE_COMPANY_DIVISION_NAMES[divID] result.append({'data': divID, 'label': getCompanyDivisionString(divName)}) return result