(svn r18955) -Feature: [NoAI] introduce GetBuildCost functions in several classes to get easier cost estimations before you start building
This commit is contained in:
@@ -103,6 +103,20 @@ public:
|
||||
TRANSPORT_INVALID = -1, //!< Tile without any transport type.
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the base cost for building/clearing several things.
|
||||
*/
|
||||
enum BuildType {
|
||||
BT_FOUNDATION, //!< Build a foundation under something
|
||||
BT_TERRAFORM, //!< Terraform
|
||||
BT_BUILD_TREES, //!< Build trees
|
||||
BT_CLEAR_GRASS, //!< Clear a tile with just grass
|
||||
BT_CLEAR_ROUGH, //!< Clear a rough tile
|
||||
BT_CLEAR_ROCKY, //!< Clear a tile with rocks
|
||||
BT_CLEAR_FIELDS, //!< Clear a tile with farm fields
|
||||
BT_CLEAR_HOUSE, //!< Clear a tile with a house
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if this tile is buildable, i.e. no things on it that needs
|
||||
* demolishing.
|
||||
@@ -435,6 +449,13 @@ public:
|
||||
* @return The TownID of the town closest to the tile.
|
||||
*/
|
||||
static TownID GetClosestTown(TileIndex tile);
|
||||
|
||||
/**
|
||||
* Get the baseprice of building/clearing various tile-related things.
|
||||
* @param build_type the type to build
|
||||
* @return The baseprice of building or removing the given object.
|
||||
*/
|
||||
static Money GetBuildCost(BuildType build_type);
|
||||
};
|
||||
|
||||
#endif /* AI_TILE_HPP */
|
||||
|
Reference in New Issue
Block a user