From 29cdb89f60eea099437aa624e63c6c5db24b1d08 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Thu, 2 Oct 2014 23:17:30 -0400 Subject: [PATCH] ignore cobwebs when searching for walls to put them on --- homedecor/cobweb.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/homedecor/cobweb.lua b/homedecor/cobweb.lua index 2256c337..cdeab8d6 100644 --- a/homedecor/cobweb.lua +++ b/homedecor/cobweb.lua @@ -87,10 +87,10 @@ function homedecor.rotate_cobweb(pos) local wall_zm = minetest.get_node({ x=pos.x, y=pos.y, z=pos.z-1}).name local wall_zp = minetest.get_node({ x=pos.x, y=pos.y, z=pos.z+1}).name - local iswall_xm = (wall_xm ~= "air") - local iswall_xp = (wall_xp ~= "air") - local iswall_zm = (wall_zm ~= "air") - local iswall_zp = (wall_zp ~= "air") + local iswall_xm = (wall_xm ~= "air" and not string.find(wall_xm, "homedecor:cobweb")) + local iswall_xp = (wall_xp ~= "air" and not string.find(wall_xp, "homedecor:cobweb")) + local iswall_zm = (wall_zm ~= "air" and not string.find(wall_zm, "homedecor:cobweb")) + local iswall_zp = (wall_zp ~= "air" and not string.find(wall_zp, "homedecor:cobweb")) -- only xm+zp, or only xp+zm means on-floor torchlike