From e84897d5bf6ddd7a208d69ea43cf00f080c25b1f Mon Sep 17 00:00:00 2001 From: proller Date: Sun, 10 Sep 2023 14:47:18 +0300 Subject: [PATCH] Tune tree grow --- src/content_abm_grow_tree.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/content_abm_grow_tree.cpp b/src/content_abm_grow_tree.cpp index b4659e005..02a1c4c83 100644 --- a/src/content_abm_grow_tree.cpp +++ b/src/content_abm_grow_tree.cpp @@ -893,8 +893,9 @@ class GrowLeaves : public ActiveBlockModifier ++i; } - const auto can_decrease = nbh[D_SELF].light < LIGHT_SUN - 1; - if (n_water_level > 1 && can_decrease && + // Slowly evaporate water and kill leaves with water_level==1 + const auto can_decay = have_air && nbh[D_SELF].light < LIGHT_SUN - 1; + if (n_water_level > 1 && can_decay && (!myrand_range(0, 10 * (grow_debug_fast ? 1 : 10)))) { float humidity = map->updateBlockHumidity(env, pos); if (humidity < params.tree_get_water_from_humidity) @@ -908,7 +909,7 @@ class GrowLeaves : public ActiveBlockModifier (grow_debug_fast || !myrand_range(0, params.leaves_to_fruit_chance))) { map->setNode(pos, {c_fruit}); } else if ( - (n_water_level == 1 && can_decrease && + (n_water_level == 1 && can_decay && (!myrand_range(0, 30 * (grow_debug_fast ? 1 : 10)))) || (n_water_level >= 1 && // dont touch old static trees have_air &&