From 292358a3db48f96f4b83d2f1365a472384ffa0b7 Mon Sep 17 00:00:00 2001 From: trans_soup <> Date: Thu, 19 Oct 2023 16:00:43 +0200 Subject: [PATCH] balance: make decomposition more expensive. decomposing leaves are now less likely to turn into dirt. --- mods/bg_tree/decompose.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/bg_tree/decompose.lua b/mods/bg_tree/decompose.lua index 8fdaf14..cd5bcd2 100644 --- a/mods/bg_tree/decompose.lua +++ b/mods/bg_tree/decompose.lua @@ -36,6 +36,7 @@ local decompose_scores = { } local decompose_cost = 30000 +local average_leaves_per_dirt = 4 blockgame.register_increasing_abm({ id = modname .. ":decompose", @@ -82,7 +83,7 @@ blockgame.register_increasing_abm({ local def = minetest.registered_nodes[node.name] local dirt_chance = def.level_max - def.level + 1 - if blockgame.chance(dirt_chance) then + if blockgame.chance(dirt_chance * average_leaves_per_dirt) then minetest.set_node(pos, {name = "bg_terrain:dirt"}) else minetest.remove_node(pos)