WormAIDev  Worm SELF_VERSION
 All Classes Files Functions Variables Pages
Static Public Member Functions | List of all members
WormStrings Class Reference

Define the WormStrings class containing string related functions. More...

Static Public Member Functions

static function DecToHex (number)
 Convert a number to its hexadecimal string representation.
static function WriteTile (tile)
 Writes a tile as a hexadecimal number.
static function GetAgeString (AgeInDays)
 Rough year/month age estimation string where year = 365 days and month = 30 days.
static function GetAircraftTypeAsText (airplane_id)
 Returns aircraft type as text.

Detailed Description

Define the WormStrings class containing string related functions.

Member Function Documentation

function WormStrings::DecToHex ( number  )
static

Convert a number to its hexadecimal string representation.

Parameters
numberThe number to convert.
Returns
The hexadecimal string.
Note
Since the Squirrel string library is not enabled we needed to define our own function. Source: http://forum.iv-multiplayer.com/index.php?topic=914.60
function WormStrings::GetAgeString ( AgeInDays  )
static

Rough year/month age estimation string where year = 365 days and month = 30 days.

Parameters
AgeInDaysThe age in days.
Returns
Text string saying how many years and months.
function WormStrings::GetAircraftTypeAsText ( airplane_id  )
static

Returns aircraft type as text.

Parameters
airplane_idThe id of the airplane
Returns
The airplane type as a text string
function WormStrings::WriteTile ( tile  )
static

Writes a tile as a hexadecimal number.

Parameters
tileThe tile to convert.
Returns
The hexadecimal string.

The documentation for this class was generated from the following file: