From 102f811d0277afefe5c90762c0c4cc11ab69713c Mon Sep 17 00:00:00 2001 From: truebrain Date: Mon, 19 Dec 2011 21:06:06 +0000 Subject: (svn r23636) -Add: introduce ScriptText in parameters where it can be used --- src/script/api/script_sign.hpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/script/api/script_sign.hpp') diff --git a/src/script/api/script_sign.hpp b/src/script/api/script_sign.hpp index 9aacc409c..e5c2164da 100644 --- a/src/script/api/script_sign.hpp +++ b/src/script/api/script_sign.hpp @@ -43,14 +43,13 @@ public: /** * Set the name of a sign. * @param sign_id The sign to set the name for. - * @param name The name for the sign. + * @param name The name for the sign (can be either a raw string, or a ScriptText object). * @pre IsValidSign(sign_id). - * @pre 'name' must have at least one character. - * @pre 'name' must have at most 30 characters. + * @pre name != NULL && len(name) != 0. * @exception ScriptError::ERR_NAME_IS_NOT_UNIQUE * @return True if and only if the name was changed. */ - static bool SetName(SignID sign_id, const char *name); + static bool SetName(SignID sign_id, Text *name); /** * Get the name of the sign. @@ -80,16 +79,15 @@ public: /** * Builds a sign on the map. * @param location The place to build the sign. - * @param text The text to place on the sign. + * @param name The text to place on the sign (can be either a raw string, or a ScriptText object). * @pre ScriptMap::IsValidTile(location). - * @pre 'text' must have at least one character. - * @pre 'text' must have at most 30 characters. + * @pre name != NULL && len(name) != 0. * @exception ScriptSign::ERR_SIGN_TOO_MANY_SIGNS * @return The SignID of the build sign (use IsValidSign() to check for validity). * In test-mode it returns 0 if successful, or any other value to indicate * failure. */ - static SignID BuildSign(TileIndex location, const char *text); + static SignID BuildSign(TileIndex location, Text *name); /** * Removes a sign from the map. -- cgit v1.2.3-54-g00ecf