summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_marine.hpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-01-29 23:56:42 +0000
committeryexo <yexo@openttd.org>2010-01-29 23:56:42 +0000
commit15016e3511b075e999cdb0db45936d5e6b223aa4 (patch)
treed053d2759a7c64b76e429d0367216567ec051534 /src/ai/api/ai_marine.hpp
parent54f958c8e5c99804d1e46c2fe6b3b5ef5cae3db6 (diff)
downloadopenttd-15016e3511b075e999cdb0db45936d5e6b223aa4.tar.xz
(svn r18955) -Feature: [NoAI] introduce GetBuildCost functions in several classes to get easier cost estimations before you start building
Diffstat (limited to 'src/ai/api/ai_marine.hpp')
-rw-r--r--src/ai/api/ai_marine.hpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ai/api/ai_marine.hpp b/src/ai/api/ai_marine.hpp
index 9ea54a784..19bc4b1d9 100644
--- a/src/ai/api/ai_marine.hpp
+++ b/src/ai/api/ai_marine.hpp
@@ -34,6 +34,15 @@ public:
};
/**
+ * Types of water-related objects in the game.
+ */
+ enum BuildType {
+ BT_DOCK, //!< Build a dock
+ BT_DEPOT, //!< Build a ship depot
+ BT_BUOY, //!< Build a buoy
+ };
+
+ /**
* Checks whether the given tile is actually a tile with a water depot.
* @param tile The tile to check.
* @pre AIMap::IsValidTile(tile).
@@ -191,6 +200,13 @@ public:
* @return Whether the canal has been/can be removed or not.
*/
static bool RemoveCanal(TileIndex tile);
+
+ /**
+ * Get the baseprice of building a water-related object.
+ * @param build_type the type of object to build
+ * @return The baseprice of building the given object.
+ */
+ static Money GetBuildCost(BuildType build_type);
};
#endif /* AI_MARINE_HPP */