diff options
Diffstat (limited to 'src/ai/api/ai_town.cpp')
-rw-r--r-- | src/ai/api/ai_town.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ai/api/ai_town.cpp b/src/ai/api/ai_town.cpp index 05615e485..85bc22a53 100644 --- a/src/ai/api/ai_town.cpp +++ b/src/ai/api/ai_town.cpp @@ -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; |