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

Fixed message when a structure can't be built due to requirements, but a different building has been built already

This commit is contained in:
rhn 2014-07-29 09:49:50 +02:00
parent fe292dfa1d
commit e7fa17af38

View File

@ -408,12 +408,12 @@ EBuildingState::EBuildingState CGameInfoCallback::canBuildStructure( const CGTow
return t->hasBuilt(id);
};
if(t->builded >= VLC->modh->settings.MAX_BUILDING_PER_TURN)
return EBuildingState::CANT_BUILD_TODAY; //building limit
if (!building->requirements.test(buildTest))
return EBuildingState::PREREQUIRES;
if(t->builded >= VLC->modh->settings.MAX_BUILDING_PER_TURN)
return EBuildingState::CANT_BUILD_TODAY; //building limit
if (building->upgrade != BuildingID::NONE && !t->hasBuilt(building->upgrade))
return EBuildingState::MISSING_BASE;