mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Fix text formatting, fix todo's
This commit is contained in:
@@ -1004,27 +1004,6 @@ void GiveBonus::applyGs(CGameState *gs)
|
||||
|
||||
auto b = std::make_shared<Bonus>(bonus);
|
||||
cbsn->addNewBonus(b);
|
||||
|
||||
|
||||
if(b->description.empty())
|
||||
{
|
||||
if((bonus.type == BonusType::LUCK || bonus.type == BonusType::MORALE)
|
||||
&& (bonus.source == BonusSource::OBJECT_TYPE || bonus.source == BonusSource::OBJECT_INSTANCE))
|
||||
{
|
||||
//?could use allways when Type == BonusDuration::Type::ONE_BATTLE
|
||||
if (bonus.val > 0)
|
||||
b->description.appendTextID("core.arraytxt.110"); //+%d Temporary until next battle"
|
||||
else
|
||||
b->description.appendTextID("core.arraytxt.109"); //-%d Temporary until next battle"
|
||||
}
|
||||
else
|
||||
{
|
||||
logGlobal->debug("Empty bonus decription. Type=%d", (int) bonus.type);
|
||||
}
|
||||
}
|
||||
// Some of(?) versions of H3 use " %s" here instead of %d. Try to replace both of them
|
||||
//boost::replace_first(descr, "%d", std::to_string(std::abs(bonus.val))); // " +/-%d Temporary until next battle
|
||||
//boost::replace_first(descr, " %s", boost::str(boost::format(" %+d") % bonus.val)); // " %s" in arraytxt.69, fountian of fortune
|
||||
}
|
||||
|
||||
void ChangeObjPos::applyGs(CGameState *gs)
|
||||
|
||||
Reference in New Issue
Block a user