MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / IsObjectType

Function IsObjectType

src/object_map.h:25–28  ·  view source on GitHub ↗

* Check whether the object on a tile is of a specific type. * @param t Tile to test. * @param type Type to test. * @pre IsTileType(t, MP_OBJECT) * @return True if type matches. */

Source from the content-addressed store, hash-verified

23 * @return True if type matches.
24 */
25inline bool IsObjectType(Tile t, ObjectType type)
26{
27 return GetObjectType(t) == type;
28}
29
30/**
31 * Check whether a tile is a object tile of a specific type.

Callers 7

TileLoop_TrackFunction · 0.85
CmdBuildObjectFunction · 0.85
GetSlopePixelZ_ObjectFunction · 0.85
AddAcceptedCargo_ObjectFunction · 0.85
AddProducedCargo_ObjectFunction · 0.85
TileLoop_ObjectFunction · 0.85
ClickTile_ObjectFunction · 0.85

Calls 1

GetObjectTypeFunction · 0.85

Tested by

no test coverage detected