--- a/src/ai/api/ai_town.hpp Thu Apr 12 12:19:13 2007 +0000
+++ b/src/ai/api/ai_town.hpp Thu Apr 12 12:35:44 2007 +0000
@@ -46,7 +46,7 @@
* @return the name of the town.
* @note the returned name must be free'd (C++ only).
*/
- char *GetName(TownID town_id);
+ static char *GetName(TownID town_id);
/**
* Gets the number of inhabitants in the town.
@@ -55,7 +55,7 @@
* @return the number of inhabitants.
* @post return value is always non-negative.
*/
- int32 GetPopulation(TownID town_id);
+ static int32 GetPopulation(TownID town_id);
/**
* Gets the location of the town.
@@ -64,7 +64,7 @@
* @return the location of the town.
* @post return value is always positive and below AIMap::GetMapSize().
*/
- TileIndex GetLocation(TownID town_id);
+ static TileIndex GetLocation(TownID town_id);
};
#ifdef DEFINE_SQUIRREL_CLASS
@@ -78,14 +78,14 @@
SQAITown.PreRegister(engine);
SQAITown.AddConstructor(engine);
- SQAITown.DefSQStaticMethod(engine, &AITown::GetClassName, "GetClassName", 1, "x");
- SQAITown.DefSQStaticMethod(engine, &AITown::IsValidTown, "IsValidTown", 2, "xi");
+ SQAITown.DefSQStaticMethod(engine, &AITown::GetClassName, "GetClassName", 1, "x");
+ SQAITown.DefSQStaticMethod(engine, &AITown::IsValidTown, "IsValidTown", 2, "xi");
+ SQAITown.DefSQStaticMethod(engine, &AITown::GetName, "GetName", 2, "xi");
+ SQAITown.DefSQStaticMethod(engine, &AITown::GetPopulation, "GetPopulation", 2, "xi");
+ SQAITown.DefSQStaticMethod(engine, &AITown::GetLocation, "GetLocation", 2, "xi");
- SQAITown.DefSQMethod(engine, &AITown::GetMaxTownID, "GetMaxTownID", 1, "x");
- SQAITown.DefSQMethod(engine, &AITown::GetTownCount, "GetTownCount", 1, "x");
- SQAITown.DefSQMethod(engine, &AITown::GetName, "GetName", 2, "xi");
- SQAITown.DefSQMethod(engine, &AITown::GetPopulation, "GetPopulation", 2, "xi");
- SQAITown.DefSQMethod(engine, &AITown::GetLocation, "GetLocation", 2, "xi");
+ SQAITown.DefSQMethod(engine, &AITown::GetMaxTownID, "GetMaxTownID", 1, "x");
+ SQAITown.DefSQMethod(engine, &AITown::GetTownCount, "GetTownCount", 1, "x");
SQAITown.PostRegister(engine);
}