balance: tweak sapling growth rate.
This commit is contained in:
parent
1282fda837
commit
477afad09e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue