- keypad: signs_lib signs get text updated too

This commit is contained in:
rnd1 2016-05-03 11:36:06 +02:00
parent 47f052a8d2
commit 3314452113

View File

@ -718,8 +718,15 @@ local function use_keypad(pos,ttl, again) -- position, time to live ( how many t
local tpos = {x=x0,y=y0,z=z0};
local node = minetest.get_node(tpos);if not node.name then return end -- error
local text = meta:get_string("text");
if text ~= "" then
if text ~= "" then -- set text on target sign
local tmeta = minetest.get_meta(tpos);if not tmeta then return end
if node.name == "default:sign_wall" then -- update text on signs with signs_lib
tmeta:set_string("text",text);
local table = minetest.registered_nodes[node.name];
if not table.on_punch then return end -- error
table.on_punch(pos, node, nil);
return
end
tmeta:set_string("infotext", text);
end