summaryrefslogtreecommitdiff
path: root/src/ai/api
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-05-22 15:23:47 +0000
committersmatz <smatz@openttd.org>2009-05-22 15:23:47 +0000
commit10d1ef5447b94d17024dc0f4bdd1b7b017431a23 (patch)
treea9563d19933124547ccd3d6c0e53c44876bdc144 /src/ai/api
parent62a7948af0ca9eb3b190a54918201e1075edcbbc (diff)
downloadopenttd-10d1ef5447b94d17024dc0f4bdd1b7b017431a23.tar.xz
(svn r16379) -Codechange: remove GetNumTowns(), GetNumIndustries() and GetActiveCompanyCount(), use PoolItem::GetNumItems() instead
Diffstat (limited to 'src/ai/api')
-rw-r--r--src/ai/api/ai_industry.cpp2
-rw-r--r--src/ai/api/ai_sign.cpp2
-rw-r--r--src/ai/api/ai_town.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/ai/api/ai_industry.cpp b/src/ai/api/ai_industry.cpp
index 5b7766fa2..005311e19 100644
--- a/src/ai/api/ai_industry.cpp
+++ b/src/ai/api/ai_industry.cpp
@@ -13,7 +13,7 @@
/* static */ int32 AIIndustry::GetIndustryCount()
{
- return ::GetNumIndustries();
+ return (int32)::Industry::GetNumItems();
}
/* static */ bool AIIndustry::IsValidIndustry(IndustryID industry_id)
diff --git a/src/ai/api/ai_sign.cpp b/src/ai/api/ai_sign.cpp
index 63bce8fdf..dd164c6ca 100644
--- a/src/ai/api/ai_sign.cpp
+++ b/src/ai/api/ai_sign.cpp
@@ -15,7 +15,7 @@
/* static */ SignID AISign::GetMaxSignID()
{
- return ::Sign::GetPoolSize() - 1;
+ return (SignID)::Sign::GetNumItems();
}
/* static */ bool AISign::IsValidSign(SignID sign_id)
diff --git a/src/ai/api/ai_town.cpp b/src/ai/api/ai_town.cpp
index e49c1a36a..cd75996f9 100644
--- a/src/ai/api/ai_town.cpp
+++ b/src/ai/api/ai_town.cpp
@@ -16,7 +16,7 @@
/* static */ int32 AITown::GetTownCount()
{
- return ::GetNumTowns();
+ return (int32)::Town::GetNumItems();
}
/* static */ bool AITown::IsValidTown(TownID town_id)