From 2ffd00909ad86a0f0a35286c37b425f7d662aa85 Mon Sep 17 00:00:00 2001 From: Cy Date: Sun, 27 Oct 2013 19:27:19 -0700 Subject: [PATCH] Bug fixes Can't use vector.new right now because it's got a bug when x/y/z == 0 Also making sure to use the word "level" not "levels" <_< --- doors_and_gates.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doors_and_gates.lua b/doors_and_gates.lua index bd2cf40f..0f57df29 100644 --- a/doors_and_gates.lua +++ b/doors_and_gates.lua @@ -5,7 +5,7 @@ local S = homedecor.gettext -- doors function isSolid(pos,adj) - adj = vector.new(adj[1],adj[2],adj[3]) + adj = {x=adj[1],y=adj[2],z=adj[3]} local node = minetest.get_node(vector.add(pos,adj)) if node then local idef = minetest.registered_nodes[minetest.get_node(vector.add(pos,adj)).name] @@ -53,7 +53,7 @@ function calculateClosed(pos) if isTrap then -- the trap door is considered closed when all nodes on its sides are solid -- or all nodes in the 3x3 above/below it are solid except the center - for levels = 0, 1 do + for level = 0, 1 do local fail = false local solids = countSolids(pos,node,level) if solids == 8 then