(svn r7152) -Feature (FS#396): allow towns to be built on top of trees in the scenario editor.
authorrubidium
Wed, 15 Nov 2006 18:57:00 +0000
changeset 5085 19b2b317c7eb
parent 5084 9d37259a5970
child 5086 386ba9fe0621
(svn r7152) -Feature (FS#396): allow towns to be built on top of trees in the scenario editor.
town_cmd.c
--- a/town_cmd.c	Tue Nov 14 17:26:41 2006 +0000
+++ b/town_cmd.c	Wed Nov 15 18:57:00 2006 +0000
@@ -1020,8 +1020,8 @@
 	if (DistanceFromEdge(tile) < 12)
 		return_cmd_error(STR_0237_TOO_CLOSE_TO_EDGE_OF_MAP);
 
-	// Can only build on clear flat areas.
-	if (!IsTileType(tile, MP_CLEAR) || GetTileSlope(tile, NULL) != SLOPE_FLAT) {
+	// Can only build on clear flat areas, possibly with trees.
+	if ((!IsTileType(tile, MP_CLEAR) && !IsTileType(tile, MP_TREES)) || GetTileSlope(tile, NULL) != SLOPE_FLAT) {
 		return_cmd_error(STR_0239_SITE_UNSUITABLE);
 	}