def _packSingleBonus(cls, bonus, item, label): model = IconBonusModel() cls._packCommon(bonus, model) model.setValue(str(item.get('value', 0))) model.setIcon(str(bonus.getC11nItem(item).itemTypeName)) model.setLabel(label) return model
def _packSingleBonus(cls, bonus, crewSkin, count, label): model = IconBonusModel() cls._packCommon(bonus, model) model.setValue(str(count)) model.setIcon(str(crewSkin.itemTypeName + str(crewSkin.getRarity()))) model.setLabel(label) return model
def _packIconBonusModel(cls, bonus, icon, count, label): model = IconBonusModel() cls._packCommon(bonus, model) model.setValue(str(count)) model.setIcon(icon) model.setLabel(label) return model
def _pack(cls, bonus): model = IconBonusModel() cls._packCommon(bonus, model) model.setName('default') model.setValue( backport.text(R.strings.quests.missions.awards.merged(), count=len(bonus.getValue()))) return [model]
def _packSingleBonus(cls, bonus, dossierIconName, dossierNamePostfix, dossierValue): model = IconBonusModel() model.setName(bonus.getName() + dossierNamePostfix) model.setIsCompensation(bonus.isCompensation()) model.setValue(str(dossierValue)) model.setIcon(dossierIconName) return model
def _packSingleBonus(cls, bonus, book, count): model = IconBonusModel() cls._packCommon(bonus, model) model.setValue(str(count)) model.setIcon(book.getBonusIconName()) return model