From b61635a3ca25aefa88229c4c724e1d22ac9dd72b Mon Sep 17 00:00:00 2001 From: maikerumine Date: Fri, 28 Oct 2016 21:42:38 -0400 Subject: [PATCH] oops. trees code remove dumb protection error --- mods/default/nodes.lua | 15 ++++++++++----- mods/default/trees.lua | 3 +-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/mods/default/nodes.lua b/mods/default/nodes.lua index f185bde..a4d2ed0 100644 --- a/mods/default/nodes.lua +++ b/mods/default/nodes.lua @@ -527,7 +527,7 @@ minetest.register_node("default:sapling", { on_construct = function(pos) minetest.get_node_timer(pos):start(math.random(2400,4800)) end, - +--[[ on_place = function(itemstack, placer, pointed_thing) itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, "default:sapling", @@ -540,6 +540,7 @@ minetest.register_node("default:sapling", { return itemstack end, + ]] }) minetest.register_node("default:leaves", { @@ -665,7 +666,7 @@ minetest.register_node("default:junglesapling", { on_construct = function(pos) minetest.get_node_timer(pos):start(math.random(2400,4800)) end, - +--[[ on_place = function(itemstack, placer, pointed_thing) itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, "default:junglesapling", @@ -678,6 +679,7 @@ minetest.register_node("default:junglesapling", { return itemstack end, + ]] }) @@ -746,7 +748,7 @@ minetest.register_node("default:pine_sapling", { on_construct = function(pos) minetest.get_node_timer(pos):start(math.random(2400,4800)) end, - +--[[ on_place = function(itemstack, placer, pointed_thing) itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, "default:pine_sapling", @@ -759,6 +761,7 @@ minetest.register_node("default:pine_sapling", { return itemstack end, + ]] }) @@ -827,7 +830,7 @@ minetest.register_node("default:acacia_sapling", { on_construct = function(pos) minetest.get_node_timer(pos):start(math.random(2400,4800)) end, - +--[[ on_place = function(itemstack, placer, pointed_thing) itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, "default:acacia_sapling", @@ -840,6 +843,7 @@ minetest.register_node("default:acacia_sapling", { return itemstack end, + ]] }) minetest.register_node("default:aspen_tree", { @@ -907,7 +911,7 @@ minetest.register_node("default:aspen_sapling", { on_construct = function(pos) minetest.get_node_timer(pos):start(math.random(2400,4800)) end, - +--[[ on_place = function(itemstack, placer, pointed_thing) itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, "default:aspen_sapling", @@ -920,6 +924,7 @@ minetest.register_node("default:aspen_sapling", { return itemstack end, + ]] }) -- diff --git a/mods/default/trees.lua b/mods/default/trees.lua index 5cf41d0..3bc6688 100644 --- a/mods/default/trees.lua +++ b/mods/default/trees.lua @@ -37,8 +37,7 @@ end function default.grow_sapling(pos) if not default.can_grow(pos) then -- try a bit later again - --minetest.get_node_timer(pos):start(math.random(240, 600)) - minetest.get_node_timer(pos):start(math.random(1, 4)) + minetest.get_node_timer(pos):start(math.random(2, 6)) return end