From df8eca60b97a4d849b01a3bc95c8513c1266b11c Mon Sep 17 00:00:00 2001 From: HybridDog Date: Sun, 27 Oct 2013 17:30:27 +0100 Subject: [PATCH] update --- init.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 7fa9387..799d30e 100644 --- a/init.lua +++ b/init.lua @@ -228,7 +228,7 @@ minetest.register_abm({ interval = INTERVAL, chance = 200.2, - action = function(pos, node) + action = function(pos) local p = {x=pos.x, y=pos.y+1, z=pos.z} if minetest.get_node(p).name == "air" and pos.y >= CONIFERS_ALTITUDE @@ -335,9 +335,8 @@ function conifers:are_leaves_surrounded(pos) -- Let's check if the neighboring node is a replacable node. for i = -1,1,2 do - if not (conifers:table_contains(replacable_nodes, nodes[area:index(pos.x+i, pos.y, pos.z)]) - or conifers:table_contains(replacable_nodes, nodes[area:index(pos.x, pos.y, pos.z+i)]) - ) then + if (not conifers:table_contains(replacable_nodes, nodes[area:index(pos.x+i, pos.y, pos.z)])) + or (not conifers:table_contains(replacable_nodes, nodes[area:index(pos.x, pos.y, pos.z+i)])) then return true end end