From c118b4371109affa17e4441a7b2b2a13c44aef39 Mon Sep 17 00:00:00 2001
From: Vanessa Dannenberg <vanessa.e.dannenberg@gmail.com>
Date: Sun, 22 Sep 2019 03:23:36 -0400
Subject: [PATCH] use signs_lib's custom pole check callback feature

requires signs_lib from commit dcdee22 or later, if present
---
 homedecor_fences/depends.txt |  2 +-
 homedecor_fences/init.lua    |  4 +---
 homedecor_misc/depends.txt   |  1 +
 homedecor_misc/init.lua      | 29 +++++++++++++++--------------
 4 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/homedecor_fences/depends.txt b/homedecor_fences/depends.txt
index 99e96229..8505ec7c 100644
--- a/homedecor_fences/depends.txt
+++ b/homedecor_fences/depends.txt
@@ -2,4 +2,4 @@ homedecor_common
 default
 basic_materials
 dye
-basic_signs?
+signs_lib?
diff --git a/homedecor_fences/init.lua b/homedecor_fences/init.lua
index f1fcf1d0..72e5a5f6 100644
--- a/homedecor_fences/init.lua
+++ b/homedecor_fences/init.lua
@@ -264,7 +264,7 @@ homedecor.register("fence_wrought_iron_2_corner", {
 })
 
 -- insert the old wood signs-on-metal-fences into signs_lib's conversion LBM
-if minetest.get_modpath("basic_signs") then
+if minetest.get_modpath("signs_lib") then
 	table.insert(signs_lib.old_fenceposts_with_signs, "homedecor:fence_brass_with_sign")
 	signs_lib.old_fenceposts["homedecor:fence_brass_with_sign"] = "homedecor:fence_brass"
 	signs_lib.old_fenceposts_replacement_signs["homedecor:fence_brass_with_sign"] = "default:sign_wall_wood_onpole"
@@ -272,8 +272,6 @@ if minetest.get_modpath("basic_signs") then
 	table.insert(signs_lib.old_fenceposts_with_signs, "homedecor:fence_wrought_iron_with_sign")
 	signs_lib.old_fenceposts["homedecor:fence_wrought_iron_with_sign"] = "homedecor:fence_wrought_iron"
 	signs_lib.old_fenceposts_replacement_signs["homedecor:fence_wrought_iron_with_sign"] = "default:sign_wall_wood_onpole"
-
-	signs_lib.allowed_poles["homedecor:pole_brass"] = true
 end
 
 -- crafting
diff --git a/homedecor_misc/depends.txt b/homedecor_misc/depends.txt
index 92ae6dc6..879b82b9 100644
--- a/homedecor_misc/depends.txt
+++ b/homedecor_misc/depends.txt
@@ -5,3 +5,4 @@ unifieddyes
 building_blocks?
 technic?
 bucket?
+signs_lib?
diff --git a/homedecor_misc/init.lua b/homedecor_misc/init.lua
index 9c85b96f..f89f8234 100644
--- a/homedecor_misc/init.lua
+++ b/homedecor_misc/init.lua
@@ -130,21 +130,22 @@ for _, f in ipairs(flowers_list) do
 end
 
 homedecor.register("pole_brass", {
-    description = S("Brass Pole"),
+	description = S("Brass Pole"),
 	mesh = "homedecor_round_pole.obj",
-    tiles = {"homedecor_generic_metal_brass.png^homedecor_generic_metal_lines_overlay.png",},
-    inventory_image = "homedecor_pole_brass_inv.png",
-    wield_image = "homedecor_pole_brass_inv.png",
-    selection_box = {
-            type = "fixed",
-            fixed = { -0.125, -0.5, -0.125, 0.125, 0.5, 0.125 },
-    },
-    collision_box = {
-            type = "fixed",
-            fixed = { -0.125, -0.5, -0.125, 0.125, 0.5, 0.125 },
-    },
-    groups = {snappy=3},
-    sounds = default.node_sound_wood_defaults(),
+	tiles = {"homedecor_generic_metal_brass.png^homedecor_generic_metal_lines_overlay.png",},
+	inventory_image = "homedecor_pole_brass_inv.png",
+	wield_image = "homedecor_pole_brass_inv.png",
+	selection_box = {
+		type = "fixed",
+		fixed = { -0.125, -0.5, -0.125, 0.125, 0.5, 0.125 },
+	},
+	collision_box = {
+		type = "fixed",
+		fixed = { -0.125, -0.5, -0.125, 0.125, 0.5, 0.125 },
+	},
+	groups = {snappy=3},
+	sounds = default.node_sound_wood_defaults(),
+	check_for_pole = true
 })
 
 homedecor.register("pole_wrought_iron", {