(svn r21654) -Add: [NoAI] AITown::IsCity() so AIs can find out which towns grow faster than others (Lord Aro)

This commit is contained in:
yexo
2010-12-29 12:19:33 +00:00
parent 0d613156e7
commit 399a9641fe
5 changed files with 45 additions and 0 deletions

View File

@@ -129,6 +129,13 @@
return ::HasBit(::Town::Get(town_id)->statues, _current_company);
}
/* static */ bool AITown::IsCity(TownID town_id)
{
if (!IsValidTown(town_id)) return false;
return ::Town::Get(town_id)->larger_town;
}
/* static */ int AITown::GetRoadReworkDuration(TownID town_id)
{
if (!IsValidTown(town_id)) return -1;