From d34d27bb8140b983e5e0d923012176e7bdb4bf36 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Thu, 12 Sep 2019 11:31:19 -0400 Subject: [PATCH] fix 'dummy' formspec images (the hacky way) --- api.lua | 5 ++++- standard_signs.lua | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/api.lua b/api.lua index 3cef9cf..c3bb163 100644 --- a/api.lua +++ b/api.lua @@ -434,7 +434,10 @@ signs_lib.construct_sign = function(pos) "textarea[0,-0.3;6.5,3;text;;${text}]".. "button_exit[2,3.4;2,1;ok;"..S("Write").."]".. "background[-0.5,-0.5;7,5;signs_lib_sign_bg.jpg]") - meta:set_string("infotext", "") + local i = meta:get_string("infotext") + if i == "" then -- it wasn't even set, so set it. + meta:set_string("infotext", "") + end end function signs_lib.destruct_sign(pos) diff --git a/standard_signs.lua b/standard_signs.lua index d9ce07d..1fdc436 100644 --- a/standard_signs.lua +++ b/standard_signs.lua @@ -37,6 +37,7 @@ for _, onpole in ipairs({"", "_onpole"}) do wield_image = "signs_lib_sign_wall_wooden_inv.png", groups = wood_groups, default_color = "0", + on_rightclick = signs_lib.construct_sign, on_construct = signs_lib.construct_sign, on_destruct = signs_lib.destruct_sign, on_receive_fields = signs_lib.receive_fields, @@ -76,6 +77,7 @@ for _, onpole in ipairs({"", "_onpole"}) do wield_image = "signs_lib_sign_wall_steel_inv.png", groups = wood_groups, default_color = "0", + on_rightclick = signs_lib.construct_sign, on_construct = signs_lib.construct_sign, on_destruct = signs_lib.destruct_sign, after_place_node = function(pos, placer, itemstack, pointed_thing)