1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2024-12-23 00:20:17 +01:00

ignore cobwebs when searching for walls to put them on

This commit is contained in:
Vanessa Ezekowitz 2014-10-02 23:17:30 -04:00
parent 90f6061fe8
commit 29cdb89f60

View File

@ -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