Class that handles all sign related functions.
More...
Detailed Description
Class that handles all sign related functions.
Member Enumeration Documentation
All sign related error messages.
- Enumerator:
ERR_SIGN_BASE |
Base for sign building related errors.
|
ERR_SIGN_TOO_MANY_SIGNS |
Too many signs have been placed.
|
Member Function Documentation
static SignID AISign::BuildSign |
( |
TileIndex |
location, |
|
|
const char * |
text | |
|
) |
| | [static] |
Builds a sign on the map.
- Parameters:
-
| location | The place to build the sign. |
| text | The text to place on the sign. |
- Precondition:
- AIMap::IsValidTile(location).
-
'text' must have at least one character.
-
'text' must have at most 30 characters.
- Exceptions:
-
- Returns:
- 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.
Gets the location of the sign.
- Parameters:
-
| sign_id | The sign to get the location of. |
- Precondition:
- IsValidSign(sign_id).
- Returns:
- The location of the sign.
static char* AISign::GetName |
( |
SignID |
sign_id |
) |
[static] |
Get the name of the sign.
- Parameters:
-
| sign_id | The sign to get the name of. |
- Precondition:
- IsValidSign(sign_id).
- Returns:
- The name of the sign.
static bool AISign::IsValidSign |
( |
SignID |
sign_id |
) |
[static] |
Checks whether the given sign index is valid.
- Parameters:
-
| sign_id | The index to check. |
- Returns:
- True if and only if the sign is valid.
static bool AISign::RemoveSign |
( |
SignID |
sign_id |
) |
[static] |
Removes a sign from the map.
- Parameters:
-
| sign_id | The sign to remove. |
- Precondition:
- IsValidSign(sign_id).
- Returns:
- True if and only if the sign has been removed.
static bool AISign::SetName |
( |
SignID |
sign_id, |
|
|
const char * |
name | |
|
) |
| | [static] |
Set the name of a sign.
- Parameters:
-
| sign_id | The sign to set the name for. |
| name | The name for the sign. |
- Precondition:
- IsValidSign(sign_id).
-
'name' must have at least one character.
-
'name' must have at most 30 characters.
- Exceptions:
-
- Returns:
- True if and only if the name was changed.