summaryrefslogtreecommitdiff
path: root/src/industry_cmd.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-02-15 10:28:40 +0000
committeralberth <alberth@openttd.org>2010-02-15 10:28:40 +0000
commit6553f499910bfa2acd71fce94b2995ea6d89e5d3 (patch)
tree39b56321e1e1d383b3651a09a903f1ec1cd839c3 /src/industry_cmd.cpp
parentbb5261a075653b7d4c01d267440b17305284a930 (diff)
downloadopenttd-6553f499910bfa2acd71fce94b2995ea6d89e5d3.tar.xz
(svn r19137) -Add: Report a more useful error when failing to build a bubble generator.
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r--src/industry_cmd.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index 5ec1d150b..846bb6222 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -1251,7 +1251,11 @@ static bool CheckNewIndustry_Lumbermill(TileIndex tile)
*/
static bool CheckNewIndustry_BubbleGen(TileIndex tile)
{
- return GetTileZ(tile) <= TILE_HEIGHT * 4;
+ if (GetTileZ(tile) > TILE_HEIGHT * 4) {
+ _error_message = STR_ERROR_CAN_ONLY_BE_BUILT_IN_LOW_AREAS;
+ return false;
+ }
+ return true;
}
/** Industrytype check function signature.