From b350098e3ea40474619d0f707b5aa6d2ac9a4cf6 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Thu, 27 Sep 2018 02:19:06 -0400 Subject: [PATCH] check for "fencelike" drawtype instead of specific nodes that way it works on more kinds of fences. --- init.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index b7cd57b..5e3fb15 100644 --- a/init.lua +++ b/init.lua @@ -679,11 +679,8 @@ end local after_place_node = function(pos, placer, itemstack, pointed_thing) local ppos = minetest.get_pointed_thing_position(pointed_thing) local pnode = minetest.get_node(ppos) - if pnode.name == "gloopblocks:fence_steel" - or pnode.name == "homedecor:fence_brass" - or pnode.name == "homedecor:fence_wrought_iron" - or pnode.name == "coloredwood:fence" - or string.find(pnode.name, "bobblocks.*pole") + local pdef = minetest.registered_items[pnode.name] + if (pdef and pdef.drawtype == "fencelike") or string.find(pnode.name, "default:fence_") or (pnode.name == "streets:bigpole" and pnode.param2 < 4) or (pnode.name == "streets:bigpole" and pnode.param2 > 19 and pnode.param2 < 24) then