1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-19 04:29:09 +00:00

Codechange: remove magic number

This commit is contained in:
Susan
2024-05-25 23:07:43 +01:00
committed by Susan
parent 23f8519624
commit 573b55cf9f

View File

@@ -57,6 +57,7 @@ uint8_t _trees_tick_ctr;
static const uint16_t DEFAULT_TREE_STEPS = 1000; ///< Default number of attempts for placing trees.
static const uint16_t DEFAULT_RAINFOREST_TREE_STEPS = 15000; ///< Default number of attempts for placing extra trees at rainforest in tropic.
static const uint16_t EDITOR_TREE_DIV = 5; ///< Game editor tree generation divisor factor.
static const uint16_t FOREST_THRESHOLD = 6; ///< Minimum amount of trees required to be considered a forest.
/**
* Tests if a tile can be converted to MP_TREES
@@ -105,7 +106,7 @@ static bool IsNearbyForest(TileIndex tile)
}
}
return (planted_tile_count >= 6);
return (planted_tile_count >= FOREST_THRESHOLD);
}
/**