112_terraintype.diff

Return to the initial folder
  1. diff --git a/src/clear_cmd.cpp b/src/clear_cmd.cpp
  2. --- a/src/clear_cmd.cpp
  3. +++ b/src/clear_cmd.cpp
  4. @@ -194,10 +194,10 @@
  5.   */
  6.  static inline bool NeighbourIsDesert(TileIndex tile)
  7.  {
  8. -	return GetTropicZone(tile + TileDiffXY(  1,  0)) == TROPICZONE_DESERT ||
  9. -			GetTropicZone(tile + TileDiffXY( -1,  0)) == TROPICZONE_DESERT ||
  10. -			GetTropicZone(tile + TileDiffXY(  0,  1)) == TROPICZONE_DESERT ||
  11. -			GetTropicZone(tile + TileDiffXY(  0, -1)) == TROPICZONE_DESERT;
  12. +	return GetGroundType(tile + TileDiffXY(  1,  0)) == GROUNDTYPE_DESERT ||
  13. +			GetGroundType(tile + TileDiffXY( -1,  0)) == GROUNDTYPE_DESERT ||
  14. +			GetGroundType(tile + TileDiffXY(  0,  1)) == GROUNDTYPE_DESERT ||
  15. +			GetGroundType(tile + TileDiffXY(  0, -1)) == GROUNDTYPE_DESERT;
  16.  }
  17.  
  18.  static void TileLoopClearDesert(TileIndex tile)
  19. @@ -208,7 +208,7 @@
  20.  
  21.  	/* Expected desert level - 0 if it shouldn't be desert */
  22.  	uint expected = 0;
  23. -	if (GetTropicZone(tile) == TROPICZONE_DESERT) {
  24. +	if (GetGroundType(tile) == GROUNDTYPE_DESERT) {
  25.  		expected = 3;
  26.  	} else if (NeighbourIsDesert(tile)) {
  27.  		expected = 1;
  28. diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
  29. --- a/src/industry_cmd.cpp
  30. +++ b/src/industry_cmd.cpp
  31. @@ -1196,7 +1196,7 @@
  32.   */
  33.  static CommandCost CheckNewIndustry_Plantation(TileIndex tile)
  34.  {
  35. -	if (GetTropicZone(tile) == TROPICZONE_DESERT) {
  36. +	if (GetGroundType(tile) == GROUNDTYPE_DESERT) {
  37.  		return_cmd_error(STR_ERROR_SITE_UNSUITABLE);
  38.  	}
  39.  	return CommandCost();
  40. @@ -1209,7 +1209,7 @@
  41.   */
  42.  static CommandCost CheckNewIndustry_Water(TileIndex tile)
  43.  {
  44. -	if (GetTropicZone(tile) != TROPICZONE_DESERT) {
  45. +	if (GetGroundType(tile) != GROUNDTYPE_DESERT) {
  46.  		return_cmd_error(STR_ERROR_CAN_ONLY_BE_BUILT_IN_DESERT);
  47.  	}
  48.  	return CommandCost();
  49. @@ -1222,7 +1222,7 @@
  50.   */
  51.  static CommandCost CheckNewIndustry_Lumbermill(TileIndex tile)
  52.  {
  53. -	if (GetTropicZone(tile) != TROPICZONE_RAINFOREST) {
  54. +	if (GetGroundType(tile) != GROUNDTYPE_RAINFOREST) {
  55.  		return_cmd_error(STR_ERROR_CAN_ONLY_BE_BUILT_IN_RAINFOREST);
  56.  	}
  57.  	return CommandCost();
  58. diff --git a/src/landscape.cpp b/src/landscape.cpp
  59. --- a/src/landscape.cpp
  60. +++ b/src/landscape.cpp
  61. @@ -1,4 +1,4 @@
  62. -/* $Id$ */
  63. +DrawFoundation/* $Id$ */
  64.  
  65.  /*
  66.   * This file is part of OpenTTD.
  67. @@ -752,7 +752,7 @@
  68.  		for (x = _settings_game.construction.freeform_edges ? 1 : 0; x < maxx; x++) {
  69.  			MakeClear(sizex * y + x, CLEAR_GRASS, 3);
  70.  			SetTileHeight(sizex * y + x, 0);
  71. -			SetTropicZone(sizex * y + x, TROPICZONE_NORMAL);
  72. +			SetGroundType(sizex * y + x, GROUNDTYPE_NORMAL);
  73.  			ClearBridgeMiddle(sizex * y + x);
  74.  		}
  75.  		MakeVoid(sizex * y + x);
  76. @@ -889,7 +889,7 @@
  77.  			if (t != INVALID_TILE && (TileHeight(t) >= 4 || IsTileType(t, MP_WATER))) break;
  78.  		}
  79.  		if (data == endof(_make_desert_or_rainforest_data)) {
  80. -			SetTropicZone(tile, TROPICZONE_DESERT);
  81. +			SetGroundType(tile, GROUNDTYPE_DESERT);
  82.  		}
  83.  	}
  84.  
  85. @@ -910,7 +910,7 @@
  86.  			if (t != INVALID_TILE && IsTileType(t, MP_CLEAR) && IsClearGround(t, CLEAR_DESERT)) break;
  87.  		}
  88.  		if (data == endof(_make_desert_or_rainforest_data)) {
  89. -			SetTropicZone(tile, TROPICZONE_RAINFOREST);
  90. +			SetGroundType(tile, GROUNDTYPE_RAINFOREST);
  91.  		}
  92.  	}
  93.  }
  94. diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp
  95. --- a/src/newgrf_commons.cpp
  96. +++ b/src/newgrf_commons.cpp
  97. @@ -320,8 +320,8 @@
  98.  }
  99.  
  100.  /**
  101. - * Function used by houses (and soon industries) to get information
  102. - * on type of "terrain" the tile it is queries sits on.
  103. + * Function used by NewGRFs to get information
  104. + * on type of "terrain" of the tile it queries.
  105.   * @param tile TileIndex of the tile been queried
  106.   * @param upper_halftile If true, query upper halftile in case of rail tiles.
  107.   * @return value corresponding to the grf expected format:
  108. @@ -330,7 +330,7 @@
  109.  uint32 GetNewGRFGroundType(TileIndex tile, TileContext context)
  110.  {
  111.  	switch (_settings_game.game_creation.landscape) {
  112. -		case LT_TROPIC: return GetTropicZone(tile);
  113. +		case LT_TROPIC: return GetGroundType(tile);
  114.  		case LT_ARCTIC: {
  115.  			bool has_snow;
  116.  			switch (GetTileType(tile)) {
  117. diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp
  118. --- a/src/newgrf_industrytiles.cpp
  119. +++ b/src/newgrf_industrytiles.cpp
  120. @@ -13,6 +13,7 @@
  121.  #include "debug.h"
  122.  #include "viewport_func.h"
  123.  #include "landscape.h"
  124. +#include "clear_func.h"
  125.  #include "newgrf.h"
  126.  #include "newgrf_industrytiles.h"
  127.  #include "newgrf_sound.h"
  128. @@ -192,6 +193,8 @@
  129.  			DrawGroundSprite(image, GroundSpritePaletteTransform(image, pal, GENERAL_SPRITE_COLOUR(rnd_colour)));
  130.  		}
  131.  	}
  132. +	
  133. +	DrawClearLandTile(ti, 3);
  134.  
  135.  	DrawNewGRFTileSeq(ti, dts, TO_INDUSTRIES, stage, GENERAL_SPRITE_COLOUR(rnd_colour));
  136.  }
  137. @@ -231,6 +234,7 @@
  138.  		if (draw_old_one) DrawFoundation(ti, FOUNDATION_LEVELED);
  139.  	}
  140.  
  141. +
  142.  	NewIndustryTileResolver(&object, gfx, ti->tile, i);
  143.  
  144.  	group = SpriteGroup::Resolve(inds->grf_prop.spritegroup[0], &object);
  145. diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
  146. --- a/src/rail_cmd.cpp
  147. +++ b/src/rail_cmd.cpp
  148. @@ -2428,7 +2428,7 @@
  149.  			}
  150.  
  151.  		case LT_TROPIC:
  152. -			if (GetTropicZone(tile) == TROPICZONE_DESERT) {
  153. +			if (GetGroundType(tile) == GROUNDTYPE_DESERT) {
  154.  				new_ground = RAIL_GROUND_ICE_DESERT;
  155.  				goto set_ground;
  156.  			}
  157. diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp
  158. --- a/src/road_cmd.cpp
  159. +++ b/src/road_cmd.cpp
  160. @@ -1384,7 +1384,7 @@
  161.  			break;
  162.  
  163.  		case LT_TROPIC:
  164. -			if (GetTropicZone(tile) == TROPICZONE_DESERT && !IsOnDesert(tile)) {
  165. +			if (GetGroundType(tile) == GROUNDTYPE_DESERT && !IsOnDesert(tile)) {
  166.  				ToggleDesert(tile);
  167.  				MarkTileDirtyByTile(tile);
  168.  			}
  169. diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
  170. --- a/src/saveload/afterload.cpp
  171. +++ b/src/saveload/afterload.cpp
  172. @@ -2273,7 +2273,7 @@
  173.  	if (IsSavegameVersionBefore(141)) {
  174.  		for (TileIndex t = 0; t < map_size; t++) {
  175.  			/* Reset tropic zone for VOID tiles, they shall not have any. */
  176. -			if (IsTileType(t, MP_VOID)) SetTropicZone(t, TROPICZONE_NORMAL);
  177. +			if (IsTileType(t, MP_VOID)) SetGroundType(t, GROUNDTYPE_NORMAL);
  178.  		}
  179.  
  180.  		/* We need to properly number/name the depots.
  181. diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
  182. --- a/src/station_cmd.cpp
  183. +++ b/src/station_cmd.cpp
  184. @@ -162,7 +162,7 @@
  185.  /**
  186.   * Check whether the tile is water.
  187.   * @param tile the tile to investigate.
  188. - * @return true if and only if the tile is a mine
  189. + * @return true if and only if the tile is a water tile
  190.   */
  191.  static bool CMSAWater(TileIndex tile)
  192.  {
  193. @@ -172,7 +172,7 @@
  194.  /**
  195.   * Check whether the tile is a tree.
  196.   * @param tile the tile to investigate.
  197. - * @return true if and only if the tile is a mine
  198. + * @return true if and only if the tile is a tree tile
  199.   */
  200.  static bool CMSATree(TileIndex tile)
  201.  {
  202. @@ -182,7 +182,7 @@
  203.  /**
  204.   * Check whether the tile is a forest.
  205.   * @param tile the tile to investigate.
  206. - * @return true if and only if the tile is a mine
  207. + * @return true if and only if the tile is a forest
  208.   */
  209.  static bool CMSAForest(TileIndex tile)
  210.  {
  211. diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp
  212. --- a/src/terraform_gui.cpp
  213. +++ b/src/terraform_gui.cpp
  214. @@ -54,7 +54,7 @@
  215.  
  216.  	TileArea ta(start, end);
  217.  	TILE_AREA_LOOP(tile, ta) {
  218. -		SetTropicZone(tile, (_ctrl_pressed) ? TROPICZONE_NORMAL : TROPICZONE_DESERT);
  219. +		SetGroundType(tile, (_ctrl_pressed) ? GROUNDTYPE_NORMAL : GROUNDTYPE_DESERT);
  220.  		DoCommandP(tile, 0, 0, CMD_LANDSCAPE_CLEAR);
  221.  		MarkTileDirtyByTile(tile);
  222.  	}
  223. diff --git a/src/tile_map.h b/src/tile_map.h
  224. --- a/src/tile_map.h
  225. +++ b/src/tile_map.h
  226. @@ -178,28 +178,29 @@
  227.  }
  228.  
  229.  /**
  230. - * Set the tropic zone
  231. - * @param tile the tile to set the zone of
  232. - * @param type the new type
  233. + * Sets the terrain type
  234. + *
  235. + * @param tile The tile to set the terrain of
  236. + * @param type The new terrain type
  237.   * @pre tile < MapSize()
  238.   */
  239. -static inline void SetTropicZone(TileIndex tile, TropicZone type)
  240. +static inline void SetGroundType(TileIndex tile, GroundType type)
  241.  {
  242.  	assert(tile < MapSize());
  243. -	assert(!IsTileType(tile, MP_VOID) || type == TROPICZONE_NORMAL);
  244. -	SB(_m[tile].m6, 0, 2, type);
  245. +	assert(!IsTileType(tile, MP_VOID));
  246. +	SB(_m[tile].m6,0, 2, type);
  247.  }
  248.  
  249.  /**
  250. - * Get the tropic zone
  251. - * @param tile the tile to get the zone of
  252. + * Get the terrain type
  253. + * @param tile the tile to get the terrain of
  254.   * @pre tile < MapSize()
  255. - * @return the zone type
  256. + * @return the terrain type
  257.   */
  258. -static inline TropicZone GetTropicZone(TileIndex tile)
  259. +static inline GroundType GetGroundType(TileIndex tile)
  260.  {
  261.  	assert(tile < MapSize());
  262. -	return (TropicZone)GB(_m[tile].m6, 0, 2);
  263. +	return (GroundType) GB(_m[tile].m6, 0, 2);
  264.  }
  265.  
  266.  /**
  267. diff --git a/src/tile_type.h b/src/tile_type.h
  268. --- a/src/tile_type.h
  269. +++ b/src/tile_type.h
  270. @@ -47,24 +47,25 @@
  271.  };
  272.  
  273.  /**
  274. - * Additional infos of a tile on a tropic game.
  275. + * Additional infos of a tile.
  276.   *
  277.   * The tropiczone is not modified during gameplay. It mainly affects tree growth. (desert tiles are visible though)
  278.   *
  279.   * In randomly generated maps:
  280. - *  TROPICZONE_DESERT: Generated everywhere, if there is neither water nor mountains (TileHeight >= 4) in a certain distance from the tile.
  281. - *  TROPICZONE_RAINFOREST: Genereated everywhere, if there is no desert in a certain distance from the tile.
  282. - *  TROPICZONE_NORMAL: Everywhere else, i.e. between desert and rainforest and on sea (if you clear the water).
  283. + *  GROUNDTYPE_DESERT: Generated everywhere, if there is neither water nor mountains (TileHeight >= 4) in a certain distance from the tile.
  284. + *  GROUNDTYPE_RAINFOREST: Genereated everywhere, if there is no desert in a certain distance from the tile.
  285. + *  GROUNDTYPE_NORMAL: Everywhere else, i.e. between desert and rainforest and on sea (if you clear the water).
  286.   *
  287.   * In scenarios:
  288. - *  TROPICZONE_NORMAL: Default value.
  289. - *  TROPICZONE_DESERT: Placed manually.
  290. - *  TROPICZONE_RAINFOREST: Placed if you plant certain rainforest-trees.
  291. + *  GROUNDTYPE_NORMAL: Default value.
  292. + *  GROUNDTYPE_DESERT: Placed manually.
  293. + *  GROUNDTYPE_RAINFOREST: Placed if you plant certain rainforest-trees.
  294.   */
  295. -enum TropicZone {
  296. -	TROPICZONE_NORMAL     = 0,      ///< Normal tropiczone
  297. -	TROPICZONE_DESERT     = 1,      ///< Tile is desert
  298. -	TROPICZONE_RAINFOREST = 2,      ///< Rainforest tile
  299. +enum GroundType {
  300. +	GROUNDTYPE_NORMAL     = 0,      ///< Normal ground tile
  301. +	GROUNDTYPE_DESERT     = 1,      ///< Desert ground tile
  302. +	GROUNDTYPE_RAINFOREST = 2,      ///< Rain forest ground tile
  303. +	GROUNDTYPE_WATER      = 3,      ///< Water ground tile
  304.  };
  305.  
  306.  /**
  307. diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
  308. --- a/src/town_cmd.cpp
  309. +++ b/src/town_cmd.cpp
  310. @@ -2759,7 +2759,7 @@
  311.  		if (TilePixelHeight(t->xy) >= GetSnowLine() && t->act_food == 0 && t->population > 90) return;
  312.  
  313.  	} else if (_settings_game.game_creation.landscape == LT_TROPIC) {
  314. -		if (GetTropicZone(t->xy) == TROPICZONE_DESERT && (t->act_food == 0 || t->act_water == 0) && t->population > 60) return;
  315. +		if (GetGroundType(t->xy) == GROUNDTYPE_DESERT && (t->act_food == 0 || t->act_water == 0) && t->population > 60) return;
  316.  	}
  317.  
  318.  	/* Use the normal growth rate values if new buildings have been funded in
  319. diff --git a/src/town_gui.cpp b/src/town_gui.cpp
  320. --- a/src/town_gui.cpp
  321. +++ b/src/town_gui.cpp
  322. @@ -384,7 +384,7 @@
  323.  				break;
  324.  
  325.  			case LT_TROPIC:
  326. -				if (GetTropicZone(this->town->xy) == TROPICZONE_DESERT) cargo_needed_for_growth = 2;
  327. +				if (GetGroundType(this->town->xy) == GROUNDTYPE_DESERT) cargo_needed_for_growth = 2;
  328.  				break;
  329.  
  330.  			default: break;
  331. @@ -496,7 +496,7 @@
  332.  				break;
  333.  
  334.  			case LT_TROPIC:
  335. -				if (GetTropicZone(this->town->xy) == TROPICZONE_DESERT) aimed_height += 3 * FONT_HEIGHT_NORMAL;
  336. +				if (GetGroundType(this->town->xy) == GROUNDTYPE_DESERT) aimed_height += 3 * FONT_HEIGHT_NORMAL;
  337.  				break;
  338.  
  339.  			default: break;
  340. diff --git a/src/tree_cmd.cpp b/src/tree_cmd.cpp
  341. --- a/src/tree_cmd.cpp
  342. +++ b/src/tree_cmd.cpp
  343. @@ -141,9 +141,9 @@
  344.  			return (TreeType)(seed * TREE_COUNT_SUB_ARCTIC / 256 + TREE_SUB_ARCTIC);
  345.  
  346.  		case LT_TROPIC:
  347. -			switch (GetTropicZone(tile)) {
  348. -				case TROPICZONE_NORMAL:  return (TreeType)(seed * TREE_COUNT_SUB_TROPICAL / 256 + TREE_SUB_TROPICAL);
  349. -				case TROPICZONE_DESERT:  return (TreeType)((seed > 12) ? TREE_INVALID : TREE_CACTUS);
  350. +			switch (GetGroundType(tile)) {
  351. +				case GROUNDTYPE_NORMAL:  return (TreeType)(seed * TREE_COUNT_SUB_TROPICAL / 256 + TREE_SUB_TROPICAL);
  352. +				case GROUNDTYPE_DESERT:  return (TreeType)((seed > 12) ? TREE_INVALID : TREE_CACTUS);
  353.  				default:                 return (TreeType)(seed * TREE_COUNT_RAINFOREST / 256 + TREE_RAINFOREST);
  354.  			}
  355.  
  356. @@ -286,7 +286,7 @@
  357.  
  358.  			IncreaseGeneratingWorldProgress(GWP_TREE);
  359.  
  360. -			if (GetTropicZone(tile) == TROPICZONE_RAINFOREST && CanPlantTreesOnTile(tile, false)) {
  361. +			if (GetGroundType(tile) == GROUNDTYPE_RAINFOREST && CanPlantTreesOnTile(tile, false)) {
  362.  				PlaceTree(tile, r);
  363.  			}
  364.  		} while (--i);
  365. @@ -378,11 +378,11 @@
  366.  				/* Be a bit picky about which trees go where. */
  367.  				if (_settings_game.game_creation.landscape == LT_TROPIC && treetype != TREE_INVALID && (
  368.  						/* No cacti outside the desert */
  369. -						(treetype == TREE_CACTUS && GetTropicZone(tile) != TROPICZONE_DESERT) ||
  370. +						(treetype == TREE_CACTUS && GetGroundType(tile) != GROUNDTYPE_DESERT) ||
  371.  						/* No rain forest trees outside the rain forest, except in the editor mode where it makes those tiles rain forest tile */
  372. -						(IsInsideMM(treetype, TREE_RAINFOREST, TREE_CACTUS) && GetTropicZone(tile) != TROPICZONE_RAINFOREST && _game_mode != GM_EDITOR) ||
  373. +						(IsInsideMM(treetype, TREE_RAINFOREST, TREE_CACTUS) && GetGroundType(tile) != GROUNDTYPE_RAINFOREST && _game_mode != GM_EDITOR) ||
  374.  						/* And no subtropical trees in the desert/rain forest */
  375. -						(IsInsideMM(treetype, TREE_SUB_TROPICAL, TREE_TOYLAND) && GetTropicZone(tile) != TROPICZONE_NORMAL))) {
  376. +						(IsInsideMM(treetype, TREE_SUB_TROPICAL, TREE_TOYLAND) && GetGroundType(tile) != GROUNDTYPE_NORMAL))) {
  377.  					msg = STR_ERROR_TREE_WRONG_TERRAIN_FOR_TREE_TYPE;
  378.  					continue;
  379.  				}
  380. @@ -417,9 +417,9 @@
  381.  					PlantTreesOnTile(tile, treetype, 0, _game_mode == GM_EDITOR ? 3 : 0);
  382.  					MarkTileDirtyByTile(tile);
  383.  
  384. -					/* When planting rainforest-trees, set tropiczone to rainforest in editor. */
  385. +					/* When planting rainforest-trees, set terrain type to rainforest in editor. */
  386.  					if (_game_mode == GM_EDITOR && IsInsideMM(treetype, TREE_RAINFOREST, TREE_CACTUS)) {
  387. -						SetTropicZone(tile, TROPICZONE_RAINFOREST);
  388. +						SetGroundType(tile, GROUNDTYPE_RAINFOREST);
  389.  					}
  390.  				}
  391.  				cost.AddCost(_price[PR_BUILD_TREES]);
  392. @@ -561,15 +561,15 @@
  393.  
  394.  static void TileLoopTreesDesert(TileIndex tile)
  395.  {
  396. -	switch (GetTropicZone(tile)) {
  397. -		case TROPICZONE_DESERT:
  398. +	switch (GetGroundType(tile)) {
  399. +		case GROUNDTYPE_DESERT:
  400.  			if (GetTreeGround(tile) != TREE_GROUND_SNOW_DESERT) {
  401.  				SetTreeGroundDensity(tile, TREE_GROUND_SNOW_DESERT, 3);
  402.  				MarkTileDirtyByTile(tile);
  403.  			}
  404.  			break;
  405.  
  406. -		case TROPICZONE_RAINFOREST: {
  407. +		case GROUNDTYPE_RAINFOREST: {
  408.  			static const SoundFx forest_sounds[] = {
  409.  				SND_42_LOON_BIRD,
  410.  				SND_43_LION,
  411. @@ -650,7 +650,7 @@
  412.  		case 3: // regular sized tree
  413.  			if (_settings_game.game_creation.landscape == LT_TROPIC &&
  414.  					GetTreeType(tile) != TREE_CACTUS &&
  415. -					GetTropicZone(tile) == TROPICZONE_DESERT) {
  416. +					GetGroundType(tile) == GROUNDTYPE_DESERT) {
  417.  				AddTreeGrowth(tile, 1);
  418.  			} else {
  419.  				switch (GB(Random(), 0, 3)) {
  420. @@ -668,7 +668,7 @@
  421.  
  422.  					case 2: { // add a neighbouring tree
  423.  						/* Don't plant extra trees if that's not allowed. */
  424. -						if ((_settings_game.game_creation.landscape == LT_TROPIC && GetTropicZone(tile) == TROPICZONE_RAINFOREST) ?
  425. +						if ((_settings_game.game_creation.landscape == LT_TROPIC && GetGroundType(tile) == GROUNDTYPE_RAINFOREST) ?
  426.  								_settings_game.construction.extra_tree_placement == ETP_NONE :
  427.  								_settings_game.construction.extra_tree_placement != ETP_ALL) {
  428.  							break;
  429. @@ -744,7 +744,7 @@
  430.  
  431.  	/* place a tree at a random rainforest spot */
  432.  	if (_settings_game.game_creation.landscape == LT_TROPIC &&
  433. -			(r = Random(), tile = RandomTileSeed(r), GetTropicZone(tile) == TROPICZONE_RAINFOREST) &&
  434. +			(r = Random(), tile = RandomTileSeed(r), GetGroundType(tile) == GROUNDTYPE_RAINFOREST) &&
  435.  			CanPlantTreesOnTile(tile, false) &&
  436.  			(tree = GetRandomTreeType(tile, GB(r, 24, 8))) != TREE_INVALID) {
  437.  		PlantTreesOnTile(tile, tree, 0, 0);
  438. diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp
  439. --- a/src/tunnelbridge_cmd.cpp
  440. +++ b/src/tunnelbridge_cmd.cpp
  441. @@ -1451,7 +1451,7 @@
  442.  		}
  443.  
  444.  		case LT_TROPIC:
  445. -			if (GetTropicZone(tile) == TROPICZONE_DESERT && !snow_or_desert) {
  446. +			if (GetGroundType(tile) == GROUNDTYPE_DESERT && !snow_or_desert) {
  447.  				SetTunnelBridgeSnowOrDesert(tile, true);
  448.  				MarkTileDirtyByTile(tile);
  449.  			}
  450.  

Return to top