diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2014-07-13 03:41:31 -0400 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2014-07-13 03:41:31 -0400 |
commit | 8581d3654eb9fc7162e5824f3d9de3d196b14139 (patch) | |
tree | ff21aa2dd969e4cc57f0f8ea15e14eaf1a8911f9 /leafdecay.lua | |
parent | 19e27348100a4caa770295bb1489a51e83c880ee (diff) |
Make all leaves drop as items during decay by default.
This behavior can be disabled by setting...
moretrees.decay_leaves_as_items = false
...in moretrees_settings.txt in your world folder, in which case leaves will
simply disappear during decay, as usual.
Diffstat (limited to 'leafdecay.lua')
-rw-r--r-- | leafdecay.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/leafdecay.lua b/leafdecay.lua index 3bce131..cf6743f 100644 --- a/leafdecay.lua +++ b/leafdecay.lua @@ -4,7 +4,8 @@ local process_drops = function(pos, name) local drops = minetest.get_node_drops(name) for _,dropitem in ipairs(drops) do - if dropitem ~= name then + if dropitem ~= name + or (string.find(name, "leaves") and moretrees.decay_leaves_as_items) then local newpos = { x=pos.x + math.random() - 0.5, y=pos.y + math.random() - 0.5, |