diff --git a/mods/signs/init.lua b/mods/signs/init.lua index da33ecf50..8f65ed63c 100644 --- a/mods/signs/init.lua +++ b/mods/signs/init.lua @@ -226,9 +226,7 @@ minetest.register_node("signs:sign_wall", { local sign_info if wdir == 0 then --how would you add sign to ceiling? - minetest.add_item(above, "signs:sign_wall") - itemstack:take_item() - return itemstack + return itemstack elseif wdir == 1 then minetest.add_node(above, {name = "signs:sign_yard", param2 = fdir}) sign_info = signs_yard[fdir + 1] diff --git a/mods/torches/init.lua b/mods/torches/init.lua index aec62bd6b..5e7de69c1 100644 --- a/mods/torches/init.lua +++ b/mods/torches/init.lua @@ -27,6 +27,7 @@ minetest.register_node(":default:torch", { wall_bottom = {-1/16, -0.5, -1/16, 1/16, 2/16, 1/16}, }, sounds = default.node_sound_wood_defaults(), + node_placement_prediction = "", on_place = function(itemstack, placer, pointed_thing) if pointed_thing.type ~= "node" then -- no interaction possible with entities, for now. @@ -45,7 +46,11 @@ minetest.register_node(":default:torch", { local wdir = minetest.dir_to_wallmounted({x = under.x - above.x, y = under.y - above.y, z = under.z - above.z}) local fakestack = itemstack local retval - if wdir <= 1 then + + if wdir == 0 then + -- Prevent placement of ceiling torches + return itemstack + elseif wdir == 1 then retval = fakestack:set_name("default:torch") else retval = fakestack:set_name("default:torch_wall")