From 693c68e1b01d7785c332de1e931de70faa79a4b5 Mon Sep 17 00:00:00 2001 From: teknomunk Date: Sun, 9 Jun 2024 21:41:11 -0500 Subject: [PATCH] Implement doVinesSpread --- mods/ITEMS/mcl_core/functions.lua | 9 ++++++++- mods/ITEMS/mcl_core/mod.conf | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_core/functions.lua b/mods/ITEMS/mcl_core/functions.lua index ad2346dd9..ece28e6da 100644 --- a/mods/ITEMS/mcl_core/functions.lua +++ b/mods/ITEMS/mcl_core/functions.lua @@ -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 diff --git a/mods/ITEMS/mcl_core/mod.conf b/mods/ITEMS/mcl_core/mod.conf index d96f159b5..872eaa816 100644 --- a/mods/ITEMS/mcl_core/mod.conf +++ b/mods/ITEMS/mcl_core/mod.conf @@ -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