From 477afad09ed6f55cd60a6b1bf30f0b8e98f48f1b Mon Sep 17 00:00:00 2001 From: trans_soup <> Date: Thu, 19 Oct 2023 15:23:42 +0200 Subject: [PATCH] balance: tweak sapling growth rate. --- mods/bg_tree/grow_sapling.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mods/bg_tree/grow_sapling.lua b/mods/bg_tree/grow_sapling.lua index 4ace93f..d29080a 100644 --- a/mods/bg_tree/grow_sapling.lua +++ b/mods/bg_tree/grow_sapling.lua @@ -37,6 +37,8 @@ local function find_first_root (pos, max_height = 8) end ]]-- +local sapling_grow_cost = 2000 + blockgame.register_increasing_abm({ id = modname .. ":grow_sapling", label = "grow sapling", @@ -46,10 +48,10 @@ blockgame.register_increasing_abm({ chance = 4, rate = function (pos, node, data) -- TODO: find connected living logs and leaves, and nearby light levels, and soil richness near roots, to calculate growth rate. - return data.value + math.random(1, 99) + return data.value + math.random(1, 100) * math.random(1, 5) end, check = function (pos, node, data) - if data.value < 200 then return false end + if data.value < sapling_grow_cost then return false end local below = pos + blockgame.vector.dirs.down local below_name = minetest.get_node(below).name