]> git.lizzy.rs Git - signs_lib.git/blobdiff - api.lua
don't allow top of bottom to be considered
[signs_lib.git] / api.lua
diff --git a/api.lua b/api.lua
index 2527470fad6877b122db1fd7742fcc156c492fdb..6b2c82589fc06967b2a1590694c88629cc267d98 100644 (file)
--- a/api.lua
+++ b/api.lua
@@ -763,6 +763,10 @@ function signs_lib.check_for_pole(pos, pointed_thing)
 
        if not pdef then return end
 
+       if signs_lib.check_for_ceiling(pointed_thing) or signs_lib.check_for_floor(pointed_thing) then
+               return false
+       end
+
        if type(pdef.check_for_pole) == "function" then
                local node = minetest.get_node(pos)
                local def = minetest.registered_items[node.name]
@@ -782,6 +786,10 @@ function signs_lib.check_for_horizontal_pole(pos, pointed_thing)
 
        if not pdef then return end
 
+       if signs_lib.check_for_ceiling(pointed_thing) or signs_lib.check_for_floor(pointed_thing) then
+               return false
+       end
+
        if type(pdef.check_for_horiz_pole) == "function" then
                local node = minetest.get_node(pos)
                local def = minetest.registered_items[node.name]