Bin no_trees_on_this_level, use exp. decay away from snow line.

Probability of placing an arctic tree is now an exponential decay
function of height distance from the snow line, instead of the previous
50% blocks.
This results in a more gradual thinning out of arctic trees in
each direction.
The algorithm is: p = exp(-3 * distance / range_setting),
using a rather crude approximation of the exponential function.

The no_trees_on_this_level setting is not really useful, and its
dual behaviour to disallow discrete height levels and turn on the
snow line behaviour is unintuitive.
Replace it with a simple on/off setting.
This commit is contained in:
Jonathan G Rennison
2015-08-21 21:11:43 +01:00
parent 3b120c6cbd
commit 381d11096f
3 changed files with 76 additions and 33 deletions

View File

@@ -311,7 +311,7 @@ struct ConstructionSettings {
bool freeform_edges; ///< allow terraforming the tiles at the map edges
uint8 extra_tree_placement; ///< (dis)allow building extra trees in-game
uint8 trees_around_snow_line_range; ///< range around snowline for mixed and arctic forest.
uint32 no_trees_on_this_level; ///< option to avoid growth of trees on certain tile level.
bool trees_around_snow_line_enabled; ///< enable mixed and arctic forest around snowline, and no trees above snowline
uint8 command_pause_level; ///< level/amount of commands that can't be executed while paused
uint32 terraform_per_64k_frames; ///< how many tile heights may, over a long period, be terraformed per 65536 frames?