mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Removed CGI in favor of VLC. Map handle is for now global variable
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
#include "BattleStacksController.h"
|
||||
#include "BattleActionsController.h"
|
||||
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../gui/CursorHandler.h"
|
||||
#include "../GameEngine.h"
|
||||
@@ -561,7 +560,7 @@ void BattleWindow::bSurrenderf()
|
||||
enemyHeroName = "#ENEMY#";
|
||||
}
|
||||
|
||||
std::string surrenderMessage = boost::str(boost::format(CGI->generaltexth->allTexts[32]) % enemyHeroName % cost); //%s states: "I will accept your surrender and grant you and your troops safe passage for the price of %d gold."
|
||||
std::string surrenderMessage = boost::str(boost::format(VLC->generaltexth->allTexts[32]) % enemyHeroName % cost); //%s states: "I will accept your surrender and grant you and your troops safe passage for the price of %d gold."
|
||||
owner.curInt->showYesNoDialog(surrenderMessage, [this](){ reallySurrender(); }, nullptr);
|
||||
}
|
||||
}
|
||||
@@ -574,7 +573,7 @@ void BattleWindow::bFleef()
|
||||
if ( owner.getBattle()->battleCanFlee() )
|
||||
{
|
||||
auto ony = std::bind(&BattleWindow::reallyFlee,this);
|
||||
owner.curInt->showYesNoDialog(CGI->generaltexth->allTexts[28], ony, nullptr); //Are you sure you want to retreat?
|
||||
owner.curInt->showYesNoDialog(VLC->generaltexth->allTexts[28], ony, nullptr); //Are you sure you want to retreat?
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -588,7 +587,7 @@ void BattleWindow::bFleef()
|
||||
if (owner.defendingHeroInstance->tempOwner == owner.curInt->cb->getPlayerID())
|
||||
heroName = owner.defendingHeroInstance->getNameTranslated();
|
||||
//calculating text
|
||||
auto txt = boost::format(CGI->generaltexth->allTexts[340]) % heroName; //The Shackles of War are present. %s can not retreat!
|
||||
auto txt = boost::format(VLC->generaltexth->allTexts[340]) % heroName; //The Shackles of War are present. %s can not retreat!
|
||||
|
||||
//printing message
|
||||
owner.curInt->showInfoDialog(boost::str(txt), comps);
|
||||
@@ -605,7 +604,7 @@ void BattleWindow::reallySurrender()
|
||||
{
|
||||
if (owner.curInt->cb->getResourceAmount(EGameResID::GOLD) < owner.getBattle()->battleGetSurrenderCost())
|
||||
{
|
||||
owner.curInt->showInfoDialog(CGI->generaltexth->allTexts[29]); //You don't have enough gold!
|
||||
owner.curInt->showInfoDialog(VLC->generaltexth->allTexts[29]); //You don't have enough gold!
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -746,13 +745,13 @@ void BattleWindow::bSpellf()
|
||||
std::string heroName = myHero->hasArt(artID, true) ? myHero->getNameTranslated() : owner.enemyHero().name;
|
||||
|
||||
//%s wields the %s, an ancient artifact which creates a p dead to all magic.
|
||||
LOCPLINT->showInfoDialog(boost::str(boost::format(CGI->generaltexth->allTexts[683])
|
||||
% heroName % CGI->artifacts()->getByIndex(artID)->getNameTranslated()));
|
||||
LOCPLINT->showInfoDialog(boost::str(boost::format(VLC->generaltexth->allTexts[683])
|
||||
% heroName % VLC->artifacts()->getByIndex(artID)->getNameTranslated()));
|
||||
}
|
||||
else if(blockingBonus->source == BonusSource::OBJECT_TYPE)
|
||||
{
|
||||
if(blockingBonus->sid.as<MapObjectID>() == Obj::GARRISON || blockingBonus->sid.as<MapObjectID>() == Obj::GARRISON2)
|
||||
LOCPLINT->showInfoDialog(CGI->generaltexth->allTexts[684]);
|
||||
LOCPLINT->showInfoDialog(VLC->generaltexth->allTexts[684]);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user