1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-09-16 09:26:28 +02:00

Use exact position of object to remove + add object name to list of objects to remove

This commit is contained in:
godric3
2024-09-30 19:17:21 +02:00
parent 253af651cc
commit e50ba14bbe
7 changed files with 35 additions and 10 deletions

View File

@@ -376,7 +376,7 @@ void CGTownInstance::onHeroLeave(const CGHeroInstance * h) const
std::string CGTownInstance::getObjectName() const
{
return getNameTranslated() + ", " + town->faction->getNameTranslated();
return getNameTranslated() + ", " + (ID == Obj::RANDOM_TOWN ? "Random town" :town->faction->getNameTranslated());
}
bool CGTownInstance::townEnvisagesBuilding(BuildingSubID::EBuildingSubID subId) const