fix 'dummy' formspec images (the hacky way)

This commit is contained in:
Vanessa Dannenberg 2019-09-12 11:31:19 -04:00
parent e86ab17aea
commit d34d27bb81
2 changed files with 6 additions and 1 deletions

View File

@ -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)

View File

@ -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)