Implement doVinesSpread

This commit is contained in:
teknomunk 2024-06-09 21:41:11 -05:00
parent ffc11faa24
commit 693c68e1b0
2 changed files with 9 additions and 2 deletions

@ -2,7 +2,9 @@
-- Lava vs water interactions
--
local modpath = minetest.get_modpath(minetest.get_current_modname())
local modname = minetest.get_current_modname()
local modpath = minetest.get_modpath(modname)
local S = minetest.get_translator(modname)
local mg_name = minetest.get_mapgen_setting("mg_name")
@ -1277,12 +1279,17 @@ end
---------------------
-- Vine generating --
---------------------
local do_vines_spread = vl_tuning.setting("gamerule:doVinesSpread", "bool", {
description = S("Whether vines can spread to other blocks. Cave vines, weeping vines, and twisting vines are not affected."),
default = true,
})
minetest.register_abm({
label = "Vines growth",
nodenames = {"mcl_core:vine"},
interval = 47,
chance = 4,
action = function(pos, node, active_object_count, active_object_count_wider)
if not do_vines_spread[1] then return end
-- First of all, check if we are even supported, otherwise, let's die!
if not mcl_core.check_vines_supported(pos, node) then

@ -1,4 +1,4 @@
name = mcl_core
description = Core items of MineClone 2: Basic biome blocks (dirt, sand, stones, etc.), derived items, glass, sugar cane, cactus, barrier, mining tools, hand, craftitems, and misc. items which don't really fit anywhere else.
depends = mcl_autogroup, mcl_init, mcl_sounds, mcl_particles, mcl_util, mcl_worlds, doc_items, mcl_enchanting, mcl_colors, mcl_stonecutter
depends = mcl_autogroup, mcl_init, mcl_sounds, mcl_particles, mcl_util, mcl_worlds, doc_items, mcl_enchanting, mcl_colors, mcl_stonecutter, vl_tuning
optional_depends = doc