From fbad089ff1d83f1345d17376b3f76f8a6b5b1d38 Mon Sep 17 00:00:00 2001 From: Sokomine Date: Sat, 2 Oct 2021 12:04:56 +0200 Subject: [PATCH] added newlines in description --- init.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 4827831..09e400d 100644 --- a/init.lua +++ b/init.lua @@ -117,13 +117,15 @@ minetest.register_tool( "replacer:replacer", end itemstack:set_metadata( metadata ); - local set_to = replacer.human_readable_metadata(metadata).." ["..tostring(metadata).."]" + local set_to = replacer.human_readable_metadata(metadata) -- change the description of the tool so that it's easier to see which replacer (if you -- have more than one in your inv) is set to which node local meta = itemstack:get_meta() - meta:set_string("description", "Replacer set to: "..set_to) + meta:set_string("description", "Node replacement tool set to:\n"..set_to.. + "\n["..tostring(metadata).."]") - minetest.chat_send_player( name, "Node replacement tool set to: "..set_to.."."); + minetest.chat_send_player( name, "Node replacement tool set to: "..set_to.. + "["..tostring(metadata).."].") return itemstack; -- nothing consumed but data changed end,