forked from mtcontrib/plantlife_modpack
Settings to disable any type of vine and vine rope. Settings to adjust rarity of vines.
This commit is contained in:
parent
28ef3e0c4b
commit
6df36da4e1
@ -3,7 +3,19 @@ vines = {
|
||||
recipes = {}
|
||||
}
|
||||
|
||||
local enable_rope = minetest.settings:get_bool("vines_enable_rope")
|
||||
local enable_roots = minetest.settings:get_bool("vines_enable_roots")
|
||||
local enable_standard = minetest.settings:get_bool("vines_enable_standard")
|
||||
local enable_side = minetest.settings:get_bool("vines_enable_side")
|
||||
local enable_jungle = minetest.settings:get_bool("vines_enable_jungle")
|
||||
local enable_willow = minetest.settings:get_bool("vines_enable_willow")
|
||||
|
||||
local default_rarity = 90
|
||||
local rarity_roots = tonumber(minetest.settings:get("vines_rarity_roots")) or default_rarity
|
||||
local rarity_standard = tonumber(minetest.settings:get("vines_rarity_standard")) or default_rarity
|
||||
local rarity_side = tonumber(minetest.settings:get("vines_rarity_side")) or default_rarity
|
||||
local rarity_jungle = tonumber(minetest.settings:get("vines_rarity_jungle")) or default_rarity
|
||||
local rarity_willow = tonumber(minetest.settings:get("vines_rarity_willow")) or default_rarity
|
||||
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("vines")
|
||||
@ -193,7 +205,8 @@ minetest.register_craft({
|
||||
|
||||
-- NODES
|
||||
|
||||
minetest.register_node("vines:rope_block", {
|
||||
if enable_rope ~= false then
|
||||
minetest.register_node("vines:rope_block", {
|
||||
description = S("Rope"),
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
@ -230,9 +243,9 @@ minetest.register_node("vines:rope_block", {
|
||||
n = minetest.get_node(p)
|
||||
end
|
||||
end
|
||||
})
|
||||
})
|
||||
|
||||
minetest.register_node("vines:rope", {
|
||||
minetest.register_node("vines:rope", {
|
||||
description = S("Rope"),
|
||||
walkable = false,
|
||||
climbable = true,
|
||||
@ -247,9 +260,9 @@ minetest.register_node("vines:rope", {
|
||||
type = "fixed",
|
||||
fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
minetest.register_node("vines:rope_end", {
|
||||
minetest.register_node("vines:rope_end", {
|
||||
description = S("Rope"),
|
||||
walkable = false,
|
||||
climbable = true,
|
||||
@ -296,7 +309,8 @@ minetest.register_node("vines:rope_end", {
|
||||
timer:start(1)
|
||||
end
|
||||
end
|
||||
})
|
||||
})
|
||||
end
|
||||
|
||||
-- SHEARS
|
||||
|
||||
@ -323,9 +337,8 @@ if enable_roots ~= false then
|
||||
"default:dirt_with_grass",
|
||||
"default:dirt"
|
||||
}
|
||||
end
|
||||
|
||||
vines.register_vine('root',
|
||||
vines.register_vine('root',
|
||||
{description = S("Roots"), average_length = 9}, {
|
||||
choose_random_wall = true,
|
||||
avoid_nodes = {"vines:root_middle"},
|
||||
@ -333,16 +346,19 @@ vines.register_vine('root',
|
||||
surface = spawn_root_surfaces,
|
||||
spawn_on_bottom = true,
|
||||
plantlife_limit = -0.6,
|
||||
-- humidity_min = 0.4,
|
||||
})
|
||||
rarity = rarity_roots,
|
||||
-- humidity_min = 0.4,
|
||||
})
|
||||
end
|
||||
|
||||
vines.register_vine('vine',
|
||||
if enable_standard ~= false then
|
||||
vines.register_vine('vine',
|
||||
{description = S("Vines"), average_length = 5}, {
|
||||
choose_random_wall = true,
|
||||
avoid_nodes = {"group:vines"},
|
||||
avoid_radius = 5,
|
||||
surface = {
|
||||
-- "default:leaves",
|
||||
-- "default:leaves",
|
||||
"default:jungleleaves",
|
||||
"moretrees:jungletree_leaves_red",
|
||||
"moretrees:jungletree_leaves_yellow",
|
||||
@ -350,16 +366,19 @@ vines.register_vine('vine',
|
||||
},
|
||||
spawn_on_bottom = true,
|
||||
plantlife_limit = -0.9,
|
||||
-- humidity_min = 0.7,
|
||||
})
|
||||
rarity = rarity_standard,
|
||||
-- humidity_min = 0.7,
|
||||
})
|
||||
end
|
||||
|
||||
vines.register_vine('side',
|
||||
if enable_side ~= false then
|
||||
vines.register_vine('side',
|
||||
{description = S("Vines"), average_length = 6}, {
|
||||
choose_random_wall = true,
|
||||
avoid_nodes = {"group:vines", "default:apple"},
|
||||
avoid_radius = 3,
|
||||
surface = {
|
||||
-- "default:leaves",
|
||||
-- "default:leaves",
|
||||
"default:jungleleaves",
|
||||
"moretrees:jungletree_leaves_red",
|
||||
"moretrees:jungletree_leaves_yellow",
|
||||
@ -367,10 +386,13 @@ vines.register_vine('side',
|
||||
},
|
||||
spawn_on_side = true,
|
||||
plantlife_limit = -0.9,
|
||||
-- humidity_min = 0.4,
|
||||
})
|
||||
rarity = rarity_side,
|
||||
-- humidity_min = 0.4,
|
||||
})
|
||||
end
|
||||
|
||||
vines.register_vine("jungle",
|
||||
if enable_jungle ~= false then
|
||||
vines.register_vine("jungle",
|
||||
{description = S("Jungle Vines"), average_length = 7}, {
|
||||
choose_random_wall = true,
|
||||
neighbors = {
|
||||
@ -390,10 +412,13 @@ vines.register_vine("jungle",
|
||||
},
|
||||
spawn_on_side = true,
|
||||
plantlife_limit = -0.9,
|
||||
-- humidity_min = 0.2,
|
||||
})
|
||||
rarity = rarity_jungle,
|
||||
-- humidity_min = 0.2,
|
||||
})
|
||||
end
|
||||
|
||||
vines.register_vine( 'willow',
|
||||
if enable_willow ~= false then
|
||||
vines.register_vine( 'willow',
|
||||
{description = S("Willow Vines"), average_length = 9}, {
|
||||
choose_random_wall = true,
|
||||
avoid_nodes = {"vines:willow_middle"},
|
||||
@ -405,8 +430,9 @@ vines.register_vine( 'willow',
|
||||
plantlife_limit = -0.8,
|
||||
spawn_on_side = true,
|
||||
surface = {"moretrees:willow_leaves"},
|
||||
-- humidity_min = 0.5
|
||||
})
|
||||
rarity = rarity_willow,
|
||||
-- humidity_min = 0.5
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
print("[Vines] Loaded!")
|
||||
print("[Vines] Loaded")
|
||||
|
32
vines/settingtypes.txt
Normal file
32
vines/settingtypes.txt
Normal file
@ -0,0 +1,32 @@
|
||||
#Enables ropes made of vine.
|
||||
vines_enable_rope (Enable vine ropes) bool true
|
||||
|
||||
#Enables root vines.
|
||||
vines_enable_roots (Enable root vines) bool true
|
||||
|
||||
#Rarity of root vines, from 1 to 100, higher numbers are rarer.
|
||||
vines_rarity_roots (Rarity of roots vines) int 90 1 100
|
||||
|
||||
#Enables the standard type of vines.
|
||||
vines_enable_standard (Enable standard vines) bool true
|
||||
|
||||
#Rarity of standard vines, from 1 to 100, higher numbers are rarer.
|
||||
vines_rarity_standard (Rarity of standard vines) int 90 1 100
|
||||
|
||||
#Enables the type of vines that grow on the sides of leaf blocks.
|
||||
vines_enable_side (Enable side vines) bool true
|
||||
|
||||
#Rarity of side vines, from 1 to 100, higher numbers are rarer.
|
||||
vines_rarity_side (Rarity of side vines) int 90 1 100
|
||||
|
||||
#Enables jungle style vines.
|
||||
vines_enable_jungle (Enable jungle vines) bool true
|
||||
|
||||
#Rarity of jungle vines, from 1 to 100, higher numbers are rarer.
|
||||
vines_rarity_jungle (Rarity of jungle vines) int 90 1 100
|
||||
|
||||
#Enables willow vines.
|
||||
vines_enable_willow (Enable willow vines) bool true
|
||||
|
||||
#Rarity of willow vines, from 1 to 100, higher numbers are rarer.
|
||||
vines_rarity_willow (Rarity of willow vines) int 90 1 100
|
Loading…
Reference in New Issue
Block a user