(svn r20745) -Fix: don't delete an object when trying to terraform a tile of it with canal under it. If we delete the object the terraforming will still fail due to the canal

This commit is contained in:
yexo
2010-09-05 14:54:18 +00:00
parent 17340f4762
commit 66c1f1881d

View File

@@ -640,6 +640,8 @@ static CommandCost TerraformTile_Object(TileIndex tile, DoCommandFlag flags, uin
{ {
ObjectType type = GetObjectType(tile); ObjectType type = GetObjectType(tile);
if (GetWaterClass(tile) == WATER_CLASS_CANAL) return_cmd_error(STR_ERROR_MUST_DEMOLISH_CANAL_FIRST);
if (type == OBJECT_OWNED_LAND) { if (type == OBJECT_OWNED_LAND) {
/* Owned land remains unsold */ /* Owned land remains unsold */
CommandCost ret = CheckTileOwnership(tile); CommandCost ret = CheckTileOwnership(tile);