1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

New rule: Cannot build upgrades without fort

This commit is contained in:
Dydzio 2018-10-09 20:23:36 +02:00
parent 32c480c33d
commit c04bb9387f

View File

@ -206,7 +206,7 @@ bool BuildingManager::getBuildingOptions(const CGTownInstance * t)
//try to upgrade dwelling
for (int i = 0; i < ARRAY_COUNT(unitsUpgrade); i++)
{
if (t->hasBuilt(unitsSource[i]) && !t->hasBuilt(unitsUpgrade[i]))
if (t->hasBuilt(unitsSource[i]) && !t->hasBuilt(unitsUpgrade[i]) && t->hasBuilt(BuildingID::FORT))
{
if (tryBuildThisStructure(t, unitsUpgrade[i]))
return true;