make spawning of under-dirt roots configurable
(enabled by default, unless explicitly set to false)
This commit is contained in:
parent
45a400f6ce
commit
08698ecd60
@ -3,6 +3,8 @@ vines = {
|
|||||||
recipes = {}
|
recipes = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local enable_roots = minetest.settings:get_bool("vines_enable_roots")
|
||||||
|
|
||||||
-- support for i18n
|
-- support for i18n
|
||||||
local S = plantlife_i18n.gettext
|
local S = plantlife_i18n.gettext
|
||||||
|
|
||||||
@ -305,6 +307,14 @@ minetest.register_tool("vines:shears", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
-- VINES
|
-- VINES
|
||||||
|
local spawn_root_surfaces = {}
|
||||||
|
|
||||||
|
if enable_roots ~= false then
|
||||||
|
spawn_root_surfaces = {
|
||||||
|
"default:dirt_with_grass",
|
||||||
|
"default:dirt"
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
vines.register_vine('root',
|
vines.register_vine('root',
|
||||||
{description = S("Roots"), average_length = 9}, {
|
{description = S("Roots"), average_length = 9}, {
|
||||||
@ -313,10 +323,7 @@ vines.register_vine('root',
|
|||||||
avoid_radius = 5,
|
avoid_radius = 5,
|
||||||
spawn_delay = 500,
|
spawn_delay = 500,
|
||||||
spawn_chance = 10,
|
spawn_chance = 10,
|
||||||
spawn_surfaces = {
|
spawn_surfaces = spawn_root_surfaces,
|
||||||
"default:dirt_with_grass",
|
|
||||||
"default:dirt"
|
|
||||||
},
|
|
||||||
spawn_on_bottom = true,
|
spawn_on_bottom = true,
|
||||||
plantlife_limit = -0.6,
|
plantlife_limit = -0.6,
|
||||||
humidity_min = 0.4,
|
humidity_min = 0.4,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user