mirror of https://github.com/OpenTTD/OpenTTD
(svn r19137) -Add: Report a more useful error when failing to build a bubble generator.
parent
bb5261a075
commit
6553f49991
|
@ -1251,7 +1251,11 @@ static bool CheckNewIndustry_Lumbermill(TileIndex tile)
|
||||||
*/
|
*/
|
||||||
static bool CheckNewIndustry_BubbleGen(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.
|
/** Industrytype check function signature.
|
||||||
|
|
|
@ -3386,6 +3386,7 @@ STR_ERROR_CAN_ONLY_BE_BUILT_IN_TOWNS_WITH_POPULATION_OF_1200 :{WHITE}... can
|
||||||
STR_ERROR_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}... can only be built in rainforest areas
|
STR_ERROR_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}... can only be built in rainforest areas
|
||||||
STR_ERROR_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}... can only be built in desert areas
|
STR_ERROR_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}... can only be built in desert areas
|
||||||
STR_ERROR_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}... can only be built in towns
|
STR_ERROR_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}... can only be built in towns
|
||||||
|
STR_ERROR_CAN_ONLY_BE_BUILT_IN_LOW_AREAS :{WHITE}... can only be built in low areas
|
||||||
STR_ERROR_CAN_ONLY_BE_POSITIONED :{WHITE}... can only be positioned near edges of map
|
STR_ERROR_CAN_ONLY_BE_POSITIONED :{WHITE}... can only be positioned near edges of map
|
||||||
STR_ERROR_FOREST_CAN_ONLY_BE_PLANTED :{WHITE}... forest can only be planted above snow-line
|
STR_ERROR_FOREST_CAN_ONLY_BE_PLANTED :{WHITE}... forest can only be planted above snow-line
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue