1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-01 00:45:26 +02:00

- it is possible to read json file with vector

- town configuration:
- - all town-related texts are now in TownHandler
- - alignments are now part of faction
- - removed CTown::bonus field
This commit is contained in:
Ivan Savenko
2012-10-05 13:11:26 +00:00
parent f113f9573d
commit 306d64b0c4
15 changed files with 227 additions and 225 deletions

View File

@ -2051,7 +2051,7 @@ void CGTownInstance::initObj()
///initialize town structures
{
blockVisit = true;
hoverName = name + ", " + town->Name();
hoverName = name + ", " + VLC->townh->factions[town->typeID].name;
if (subID == ETownType::DUNGEON)
creatures.resize(GameConstants::CREATURES_PER_TOWN+1);//extra dwelling for Dungeon
@ -2294,7 +2294,7 @@ std::vector<int> CGTownInstance::availableItemsIds(EMarketMode::EMarketMode mode
std::string CGTownInstance::nodeName() const
{
return "Town (" + (town ? town->Name() : "unknown") + ") of " + name;
return "Town (" + (town ? VLC->townh->factions[town->typeID].name : "unknown") + ") of " + name;
}
void CGTownInstance::deserializationFix()
@ -2372,7 +2372,7 @@ bool CGTownInstance::addBonusIfBuilt(int building, int type, int val, TPropagato
if(hasBuilt(building))
{
std::ostringstream descr;
descr << VLC->generaltexth->buildings[subID][building].first << " ";
descr << town->buildings[building]->Name() << " ";
if(val > 0)
descr << "+";
else if(val < 0)