1
0
mirror of https://github.com/minetest/minetest_game.git synced 2024-11-11 12:30:25 +01:00

Retain sign text when editing is aborted by <esc>

This commit is contained in:
Zefram 2014-07-20 17:22:54 +01:00 committed by sfan5
parent c8845e8d44
commit d4c24a30e9

View File

@ -723,7 +723,7 @@ minetest.register_node("default:sign_wall", {
return
end
local meta = minetest.get_meta(pos)
fields.text = fields.text or ""
if not fields.text then return end
minetest.log("action", (sender:get_player_name() or "").." wrote \""..fields.text..
"\" to sign at "..minetest.pos_to_string(pos))
meta:set_string("text", fields.text)