1
0
mirror of https://github.com/mt-mods/plantlife_modpack.git synced 2024-11-16 07:10:38 +01:00

Option to disable vines:vines item, as it seems pointless.

All recipes allow the vines group, so any vine end item will work.
This commit is contained in:
Jordan Leppert 2021-12-04 19:22:11 +00:00
parent c7d0fd3c53
commit c76fd45a2c
2 changed files with 17 additions and 7 deletions

View File

@ -3,6 +3,7 @@ vines = {
recipes = {} recipes = {}
} }
local enable_vines = minetest.settings:get_bool("vines_enable_vines")
local enable_rope = minetest.settings:get_bool("vines_enable_rope") local enable_rope = minetest.settings:get_bool("vines_enable_rope")
local enable_roots = minetest.settings:get_bool("vines_enable_roots") local enable_roots = minetest.settings:get_bool("vines_enable_roots")
local enable_standard = minetest.settings:get_bool("vines_enable_standard") local enable_standard = minetest.settings:get_bool("vines_enable_standard")
@ -25,11 +26,13 @@ local S = minetest.get_translator("vines")
-- ITEMS -- ITEMS
minetest.register_craftitem("vines:vines", { if enable_vines ~= false then
description = S("Vines"), minetest.register_craftitem("vines:vines", {
inventory_image = "vines_item.png", description = S("Vines"),
groups = {vines = 1, flammable = 2} inventory_image = "vines_item.png",
}) groups = {vines = 1, flammable = 2}
})
end
-- FUNCTIONS -- FUNCTIONS
@ -86,7 +89,11 @@ vines.register_vine = function( name, defs, biome )
local vine_name_middle = 'vines:' .. name .. '_middle' local vine_name_middle = 'vines:' .. name .. '_middle'
local vine_image_end = "vines_" .. name .. "_end.png" local vine_image_end = "vines_" .. name .. "_end.png"
local vine_image_middle = "vines_" .. name .. "_middle.png" local vine_image_middle = "vines_" .. name .. "_middle.png"
local drop_node = vine_name_end local drop_node = vine_name_end
if enable_vines ~= false then
drop_node = "vines:vines"
end
local spawn_plants = function(pos, fdir) local spawn_plants = function(pos, fdir)
local max_length = math.random(defs.average_length) local max_length = math.random(defs.average_length)
@ -121,7 +128,7 @@ vines.register_vine = function( name, defs, biome )
walkable = false, walkable = false,
climbable = true, climbable = true,
wield_image = vine_image_end, wield_image = vine_image_end,
drop = "vines:vines", drop = drop_node,
sunlight_propagates = true, sunlight_propagates = true,
paramtype = "light", paramtype = "light",
paramtype2 = "wallmounted", paramtype2 = "wallmounted",
@ -176,7 +183,7 @@ vines.register_vine = function( name, defs, biome )
description = S("Matured") .. " " .. defs.description, description = S("Matured") .. " " .. defs.description,
walkable = false, walkable = false,
climbable = true, climbable = true,
drop = "vines:vines", drop = drop_node,
sunlight_propagates = true, sunlight_propagates = true,
paramtype = "light", paramtype = "light",
paramtype2 = "wallmounted", paramtype2 = "wallmounted",

View File

@ -1,3 +1,6 @@
#Enable the vines item
vines_enable_vines (Enable vines item) bool true
#Enables ropes made of vine. #Enables ropes made of vine.
vines_enable_rope (Enable vine ropes) bool true vines_enable_rope (Enable vine ropes) bool true