(svn r18955) -Feature: [NoAI] introduce GetBuildCost functions in several classes to get easier cost estimations before you start building
This commit is contained in:
@@ -63,6 +63,16 @@ public:
|
||||
ROADVEHTYPE_TRUCK, //!< Build objects useable for trucks and cargo trams
|
||||
};
|
||||
|
||||
/**
|
||||
* Types of road-related objects in the game.
|
||||
*/
|
||||
enum BuildType {
|
||||
BT_ROAD, //!< Build a piece of road
|
||||
BT_DEPOT, //!< Build a road depot
|
||||
BT_BUS_STOP, //!< Build a bus stop
|
||||
BT_TRUCK_STOP, //!< Build a truck stop
|
||||
};
|
||||
|
||||
/**
|
||||
* Determines whether a busstop or a truckstop is needed to transport a certain cargo.
|
||||
* @param cargo_type The cargo to test.
|
||||
@@ -451,6 +461,15 @@ public:
|
||||
*/
|
||||
static bool RemoveRoadStation(TileIndex tile);
|
||||
|
||||
/**
|
||||
* Get the baseprice of building a road-related object.
|
||||
* @param roadtype the roadtype that is build (on)
|
||||
* @param build_type the type of object to build
|
||||
* @pre IsRoadTypeAvailable(railtype)
|
||||
* @return The baseprice of building the given object.
|
||||
*/
|
||||
static Money GetBuildCost(RoadType roadtype, BuildType build_type);
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user