summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-02-23 21:07:01 +0000
committeryexo <yexo@openttd.org>2009-02-23 21:07:01 +0000
commit932b1c24b23867083c87c6cd1aeca46d686d0cb4 (patch)
treefcdce95a56bedaf9b2fc0d5d699d52dcf13cfe13 /src/ai
parent1884ba20bc1b6b02a256e444af04f96e7bc22778 (diff)
downloadopenttd-932b1c24b23867083c87c6cd1aeca46d686d0cb4.tar.xz
(svn r15563) -Change [API CHANGE]: Remove AIIndustry::GetMaxIndustryID().
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/api/ai_industry.cpp5
-rw-r--r--src/ai/api/ai_industry.hpp12
-rw-r--r--src/ai/api/ai_industry.hpp.sq1
3 files changed, 2 insertions, 16 deletions
diff --git a/src/ai/api/ai_industry.cpp b/src/ai/api/ai_industry.cpp
index a1493c0b5..7c0753502 100644
--- a/src/ai/api/ai_industry.cpp
+++ b/src/ai/api/ai_industry.cpp
@@ -11,11 +11,6 @@
#include "../../station_map.h"
#include "table/strings.h"
-/* static */ IndustryID AIIndustry::GetMaxIndustryID()
-{
- return ::GetMaxIndustryIndex();
-}
-
/* static */ int32 AIIndustry::GetIndustryCount()
{
return ::GetNumIndustries();
diff --git a/src/ai/api/ai_industry.hpp b/src/ai/api/ai_industry.hpp
index abaff2ea2..bf93cd466 100644
--- a/src/ai/api/ai_industry.hpp
+++ b/src/ai/api/ai_industry.hpp
@@ -15,18 +15,10 @@ public:
static const char *GetClassName() { return "AIIndustry"; }
/**
- * Gets the maximum industry index; there are no valid industries with a
- * higher index.
- * @return The maximum industry index.
- * @post Return value is always non-negative.
- */
- static IndustryID GetMaxIndustryID();
-
- /**
- * Gets the number of industries. This is different than GetMaxIndustryID()
- * because of the way OpenTTD works internally.
+ * Gets the number of industries.
* @return The number of industries.
* @post Return value is always non-negative.
+ * @note The maximum valid IndustryID can be higher then the value returned.
*/
static int32 GetIndustryCount();
diff --git a/src/ai/api/ai_industry.hpp.sq b/src/ai/api/ai_industry.hpp.sq
index 2d50dd330..2e93f177e 100644
--- a/src/ai/api/ai_industry.hpp.sq
+++ b/src/ai/api/ai_industry.hpp.sq
@@ -17,7 +17,6 @@ void SQAIIndustry_Register(Squirrel *engine) {
SQAIIndustry.PreRegister(engine);
SQAIIndustry.AddConstructor<void (AIIndustry::*)(), 1>(engine, "x");
- SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetMaxIndustryID, "GetMaxIndustryID", 1, ".");
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetIndustryCount, "GetIndustryCount", 1, ".");
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::IsValidIndustry, "IsValidIndustry", 2, ".i");
SQAIIndustry.DefSQStaticMethod(engine, &AIIndustry::GetName, "GetName", 2, ".i");