From 7d9aa28054e23ad6a7e217ba79bbe5f9a828dc32 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 25 Jul 2017 02:44:40 +0200 Subject: [PATCH] More regular sign placement --- mods/ITEMS/mcl_signs/init.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_signs/init.lua b/mods/ITEMS/mcl_signs/init.lua index fb44508002..6e377dbc13 100644 --- a/mods/ITEMS/mcl_signs/init.lua +++ b/mods/ITEMS/mcl_signs/init.lua @@ -258,11 +258,19 @@ minetest.register_node("mcl_signs:wall_sign", { return itemstack elseif wdir == 1 then place_pos = above - minetest.add_node(place_pos, {name = "mcl_signs:standing_sign", param2 = fdir}) + local stand = ItemStack(itemstack) + stand:set_name("mcl_signs:standing_sign") + local _, success = minetest.item_place_node(stand, placer, pointed_thing, fdir) + if not success then + return itemstack + end sign_info = signs_yard[fdir + 1] else place_pos = above - minetest.add_node(place_pos, {name = "mcl_signs:wall_sign", param2 = fdir}) + local _, success = minetest.item_place_node(itemstack, placer, pointed_thing, fdir) + if not success then + return itemstack + end sign_info = signs[fdir + 1] end