OpenTTD AI API  12.1
Static Public Member Functions
AIObjectType Class Reference

Class that handles all object-type related functions. More...

Inheritance diagram for AIObjectType:

Static Public Member Functions

static bool IsValidObjectType (ObjectType object_type)
 Checks whether the given object-type is valid. More...
 
static char * GetName (ObjectType object_type)
 Get the name of an object-type. More...
 
static uint8 GetViews (ObjectType object_type)
 Get the number of views for an object-type. More...
 
static bool BuildObject (ObjectType object_type, uint8 view, TileIndex tile)
 Build an object of the specified type. More...
 

Detailed Description

Class that handles all object-type related functions.

Member Function Documentation

◆ BuildObject()

static bool AIObjectType::BuildObject ( ObjectType  object_type,
uint8  view,
TileIndex  tile 
)
static

Build an object of the specified type.

Parameters
object_typeThe type of the object to build.
viewThe view for teh object.
tileThe tile to build the object on.
Precondition
IsValidObjectType(object_type).
Returns
True if the object was successfully build.

◆ GetName()

static char* AIObjectType::GetName ( ObjectType  object_type)
static

Get the name of an object-type.

Parameters
object_typeThe type to get the name for.
Precondition
IsValidObjectType(object_type).
Returns
The name of an object.

◆ GetViews()

static uint8 AIObjectType::GetViews ( ObjectType  object_type)
static

Get the number of views for an object-type.

Parameters
object_typeThe type to get the number of views for.
Precondition
IsValidObjectType(object_type).
Returns
The number of views for an object.

◆ IsValidObjectType()

static bool AIObjectType::IsValidObjectType ( ObjectType  object_type)
static

Checks whether the given object-type is valid.

Parameters
object_typeThe type to check.
Returns
True if and only if the object-type is valid.