summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2015-08-14 11:45:13 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2015-08-14 11:45:13 -0400
commit7a105a084107492145daf5b948640ae187f541c2 (patch)
tree90732bc1ed17c9885c48af94502aa7e0036f4f7f
parent10ce68961fa6cb810340b7fb6da3ced2250e606c (diff)
don't run the decay code on ANY of the default trees
this also disables decaying default trees and default jungletrees with the regular default single color leaves
-rw-r--r--default_settings.txt12
-rw-r--r--leafdecay.lua32
2 files changed, 1 insertions, 43 deletions
diff --git a/default_settings.txt b/default_settings.txt
index f3843de..63dfa39 100644
--- a/default_settings.txt
+++ b/default_settings.txt
@@ -38,18 +38,6 @@ moretrees.plantlike_leaves = false
moretrees.enable_leafdecay = true
--- Enable this one if you want this mod's leafdecay code to affect the old
--- default trees too; this setting is independent of the one above. You'll
--- want to manually disable the default leafdecay code in minetest_game if
--- you enable this, otherwise you'll have two sets of leaf decay code running
--- at the same time, which will just waste CPU for no benefit.
-
-moretrees.enable_default_leafdecay = true
-
--- Enable this one for default *jungle* leaves
-
-moretrees.enable_default_jungle_leafdecay = true
-
-- Enable this if you want moretrees to redefine default apples so that they
-- fall when leaves decay/are dug.
diff --git a/leafdecay.lua b/leafdecay.lua
index 04ee711..26851a1 100644
--- a/leafdecay.lua
+++ b/leafdecay.lua
@@ -19,7 +19,7 @@ end
if moretrees.enable_leafdecay then
for i in ipairs(moretrees.treelist) do
local treename = moretrees.treelist[i][1]
- if treename ~= "jungletree" and treename ~= "fir" and treename ~= "palm" then
+ if treename ~= "jungletree" and treename ~= "pine" and treename ~= acacia and treename ~= "fir" and treename ~= "palm" then
minetest.register_abm({
nodenames = "moretrees:"..treename.."_leaves",
interval = moretrees.leafdecay_delay,
@@ -71,21 +71,6 @@ if moretrees.enable_leafdecay then
})
end
-if moretrees.enable_default_leafdecay then
-
- minetest.register_abm({
- nodenames = "default:leaves",
- interval = moretrees.default_leafdecay_delay,
- chance = moretrees.default_leafdecay_chance,
- action = function(pos, node, active_object_count, active_object_count_wider)
- if minetest.find_node_near(pos, moretrees.default_leafdecay_radius, { "ignore", "default:tree" }) then return end
- process_drops(pos, node.name)
- minetest.remove_node(pos)
- nodeupdate(pos)
- end
- })
-end
-
-- Decay apple tree blossoms from nature_classic mod
if minetest.get_modpath("nature_classic") then
minetest.register_abm({
@@ -100,18 +85,3 @@ if minetest.get_modpath("nature_classic") then
end
})
end
-
-if moretrees.enable_default_jungle_leafdecay then
- minetest.register_abm({
- nodenames = "default:jungleleaves",
- interval = moretrees.default_jungle_leafdecay_delay,
- chance = moretrees.default_jungle_leafdecay_chance,
- action = function(pos, node, active_object_count, active_object_count_wider)
- if minetest.find_node_near(pos, moretrees.default_jungle_leafdecay_radius, { "ignore", "default:jungletree" }) then return end
- process_drops(pos, node.name)
- minetest.remove_node(pos)
- nodeupdate(pos)
- end
- })
-end
-