diff options
author | SamuXarick <43006711+SamuXarick@users.noreply.github.com> | 2021-09-14 21:06:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-14 22:06:55 +0200 |
commit | 37de87812994be72399a9588473ece1c514397c0 (patch) | |
tree | b450411376890b3ac8310dcca2f5b9bad3ca830f /src/script/api/script_tile.hpp | |
parent | c6035158ca9df31d12ba28acf2037ff7d5aeb248 (diff) | |
download | openttd-37de87812994be72399a9588473ece1c514397c0.tar.xz |
Feature: [AI/GS] Missing water related functions and objects (#8390)
Diffstat (limited to 'src/script/api/script_tile.hpp')
-rw-r--r-- | src/script/api/script_tile.hpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/script/api/script_tile.hpp b/src/script/api/script_tile.hpp index 423044b21..4ee12c691 100644 --- a/src/script/api/script_tile.hpp +++ b/src/script/api/script_tile.hpp @@ -119,6 +119,7 @@ public: 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 + BT_CLEAR_WATER, ///< Clear a tile with either river or sea }; /** @@ -159,10 +160,27 @@ public: static bool IsBuildableRectangle(TileIndex tile, uint width, uint height); /** + * Checks whether the given tile is actually a sea tile. + * @param tile The tile to check on. + * @pre ScriptMap::IsValidTile(tile). + * @return True if and only if the tile is a sea tile. + */ + static bool IsSeaTile(TileIndex tile); + + /** + * Checks whether the given tile is actually a river tile. + * @param tile The tile to check on. + * @pre ScriptMap::IsValidTile(tile). + * @return True if and only if the tile is a river tile. + */ + static bool IsRiverTile(TileIndex tile); + + /** * Checks whether the given tile is actually a water tile. * @param tile The tile to check on. * @pre ScriptMap::IsValidTile(tile). * @return True if and only if the tile is a water tile. + * @note Returns false when a buoy is on the tile. */ static bool IsWaterTile(TileIndex tile); |