summaryrefslogtreecommitdiff
path: root/node_defs.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2015-08-15 16:58:17 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2015-08-15 16:58:17 -0400
commitf59fd56257d204e65fbde95f1ecdc8d889209f1f (patch)
tree2e572520d72ed3f9d4d80222a4dc1c93488892f6 /node_defs.lua
parent6694b8da616241ec59072950f60e686464526178 (diff)
use default leaf decay code for everything.
Diffstat (limited to 'node_defs.lua')
-rw-r--r--node_defs.lua18
1 files changed, 5 insertions, 13 deletions
diff --git a/node_defs.lua b/node_defs.lua
index 3753be0..6c6701a 100644
--- a/node_defs.lua
+++ b/node_defs.lua
@@ -33,11 +33,6 @@ end
-- redefine default leaves to handle plantlike and/or leaf decay options
-if moretrees.enable_default_leafdecay then
- minetest.override_item("default:leaves", {
- groups = { snappy = 3, flammable = 2, leaves = 1 }
- })
-end
if moretrees.plantlike_leaves then
minetest.override_item("default:leaves", {
inventory_image = minetest.inventorycube("default_leaves.png"),
@@ -52,11 +47,6 @@ end
-- redefine default jungle leaves for same
-if moretrees.enable_default_leafdecay then
- minetest.override_item("default:jungleleaves", {
- groups = { snappy = 3, flammable = 2, leaves = 1 }
- })
-end
if moretrees.plantlike_leaves then
minetest.override_item("default:jungleleaves", {
inventory_image = minetest.inventorycube("default_jungleleaves.png"),
@@ -125,9 +115,11 @@ for i in ipairs(moretrees.treelist) do
-- this is because max_items is 1
local droprarity = 100
+ local decay = moretrees.leafdecay_radius
if treename == "palm" then
droprarity = 20
+ decay = moretrees.palm_leafdecay_radius
end
local moretrees_leaves_inventory_image = nil
@@ -147,7 +139,7 @@ for i in ipairs(moretrees.treelist) do
tiles = { "moretrees_"..treename.."_leaves.png" },
inventory_image = moretrees_leaves_inventory_image,
paramtype = "light",
- groups = {snappy=3, flammable=2, leaves=1, moretrees_leaves=1},
+ groups = {snappy = 3, flammable = 2, leaves = 1, moretrees_leaves = 1, leafdecay = decay},
sounds = default.node_sound_leaves_defaults(),
drop = {
@@ -298,7 +290,7 @@ for color = 1, #jungleleaves do
tiles = {"moretrees_jungletree_leaves_"..jungleleaves[color]..".png"},
inventory_image = moretrees_leaves_inventory_image,
paramtype = "light",
- groups = {snappy=3, flammable=2, leaves=1, moretrees_leaves=1},
+ groups = {snappy = 3, flammable = 2, leaves = 1, moretrees_leaves = 1, leafdecay = 3 },
drop = {
max_items = 1,
items = {
@@ -326,7 +318,7 @@ minetest.register_node("moretrees:fir_leaves_bright", {
tiles = { "moretrees_fir_leaves_bright.png" },
inventory_image = moretrees_leaves_inventory_image,
paramtype = "light",
- groups = {snappy=3, flammable=2, leaves=1, moretrees_leaves=1 },
+ groups = {snappy = 3, flammable = 2, leaves = 1, moretrees_leaves = 1, leafdecay = 3 },
drop = {
max_items = 1,
items = {