Index: src/ai/api/ai_sign.hpp.sq =================================================================== --- src/ai/api/ai_sign.hpp.sq (revision 12185) +++ src/ai/api/ai_sign.hpp.sq (working copy) @@ -15,14 +15,13 @@ SQAISign.AddConstructor(engine, "x"); SQAISign.DefSQStaticMethod(engine, &AISign::GetClassName, "GetClassName", 1, "x"); + SQAISign.DefSQStaticMethod(engine, &AISign::GetMaxSignID, "GetMaxSignID", 1, "x"); + SQAISign.DefSQStaticMethod(engine, &AISign::GetSignCount, "GetSignCount", 1, "x"); SQAISign.DefSQStaticMethod(engine, &AISign::IsValidSign, "IsValidSign", 2, "xi"); + SQAISign.DefSQStaticMethod(engine, &AISign::GetText, "GetText", 2, "xi"); + SQAISign.DefSQStaticMethod(engine, &AISign::GetLocation, "GetLocation", 2, "xi"); + SQAISign.DefSQStaticMethod(engine, &AISign::RemoveSign, "RemoveSign", 2, "xi"); + SQAISign.DefSQStaticMethod(engine, &AISign::BuildSign, "BuildSign", 3, "xis"); - SQAISign.DefSQMethod(engine, &AISign::GetMaxSignID, "GetMaxSignID", 1, "x"); - SQAISign.DefSQMethod(engine, &AISign::GetSignCount, "GetSignCount", 1, "x"); - SQAISign.DefSQMethod(engine, &AISign::GetText, "GetText", 2, "xi"); - SQAISign.DefSQMethod(engine, &AISign::GetLocation, "GetLocation", 2, "xi"); - SQAISign.DefSQMethod(engine, &AISign::RemoveSign, "RemoveSign", 2, "xi"); - SQAISign.DefSQMethod(engine, &AISign::BuildSign, "BuildSign", 3, "xis"); - SQAISign.PostRegister(engine); } Index: src/ai/api/ai_sign.hpp =================================================================== --- src/ai/api/ai_sign.hpp (revision 12185) +++ src/ai/api/ai_sign.hpp (working copy) @@ -22,7 +22,7 @@ * @return the maximum sign index. * @post return value is always non-negative. */ - SignID GetMaxSignID(); + static SignID GetMaxSignID(); /** * Gets the number of signs. This is different than GetMaxSignID() @@ -30,7 +30,7 @@ * @return the number of signs. * @post return value is always non-negative. */ - int32 GetSignCount(); + static int32 GetSignCount(); /** * Checks whether the given sign index is valid. @@ -46,7 +46,7 @@ * @return the text on the sign. * @note the returned name must be free'd (C++ only). */ - char *GetText(SignID sign_id); + static char *GetText(SignID sign_id); /** * Gets the location of the sign. @@ -55,7 +55,7 @@ * @return the location of the sign. * @post return value is always positive and below AIMap::GetMapSize(). */ - TileIndex GetLocation(SignID sign_id); + static TileIndex GetLocation(SignID sign_id); /** * Removes a sign from the map. @@ -63,7 +63,7 @@ * @pre sign_id has to be valid (use IsValidSign()). * @return true if and only if the sign has been removed. */ - bool RemoveSign(SignID sign_id); + static bool RemoveSign(SignID sign_id); /** * Builds a sign on the map. @@ -75,7 +75,7 @@ * In test-mode it returns 0 if successful, or any other value to indicate * failure. */ - SignID BuildSign(TileIndex location, const char *text); + static SignID BuildSign(TileIndex location, const char *text); }; #endif /* AI_SIGN_HPP */ Index: src/ai/api/ai_sign.cpp =================================================================== --- src/ai/api/ai_sign.cpp (revision 12185) +++ src/ai/api/ai_sign.cpp (working copy) @@ -48,7 +48,7 @@ bool AISign::RemoveSign(SignID sign_id) { _cmd_text = ""; - return this->DoCommand(0, sign_id, 0, CMD_RENAME_SIGN); + return DoCommand(0, sign_id, 0, CMD_RENAME_SIGN); } SignID AISign::BuildSign(TileIndex location, const char *text) @@ -58,14 +58,14 @@ /* Reset the internal NewSignID in case we are in TestMode */ AIObject::SetNewSignID(0); - bool ret = this->DoCommand(location, 0, 0, CMD_PLACE_SIGN); + bool ret = DoCommand(location, 0, 0, CMD_PLACE_SIGN); if (!ret) return INVALID_SIGN; SignID new_sign_id = AIObject::GetNewSignID(); _cmd_text = text; - ret = this->DoCommand(0, new_sign_id, 0, CMD_RENAME_SIGN); + ret = DoCommand(0, new_sign_id, 0, CMD_RENAME_SIGN); if (!ret) { - this->RemoveSign(new_sign_id); + RemoveSign(new_sign_id); return INVALID_SIGN; } return new_sign_id;