1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Add bonus description generation for map objects

This commit is contained in:
Ivan Savenko
2024-10-25 18:36:02 +00:00
parent 8a5ac73438
commit ee59bc4e71
8 changed files with 22 additions and 15 deletions

View File

@@ -581,13 +581,13 @@ void MoraleLuckBox::set(const AFactionMember * node)
else if(morale && node && node->getBonusBearer()->hasBonusOfType(BonusType::NO_MORALE))
{
auto noMorale = node->getBonusBearer()->getBonus(Selector::type()(BonusType::NO_MORALE));
text += "\n" + noMorale->Description();
text += "\n" + noMorale->Description(LOCPLINT->cb.get());
component.value = 0;
}
else if (!morale && node && node->getBonusBearer()->hasBonusOfType(BonusType::NO_LUCK))
{
auto noLuck = node->getBonusBearer()->getBonus(Selector::type()(BonusType::NO_LUCK));
text += "\n" + noLuck->Description();
text += "\n" + noLuck->Description(LOCPLINT->cb.get());
component.value = 0;
}
else
@@ -596,7 +596,7 @@ void MoraleLuckBox::set(const AFactionMember * node)
for(auto & bonus : * modifierList)
{
if(bonus->val) {
const std::string& description = bonus->Description();
const std::string& description = bonus->Description(LOCPLINT->cb.get());
//arraytxt already contains \n
if (description.size() && description[0] != '\n')
addInfo += '\n';