From 5f70189e08aa991e2530f832691ba200adf0ecfb Mon Sep 17 00:00:00 2001 From: the-real-herowl Date: Sun, 28 Apr 2024 15:04:39 +0000 Subject: [PATCH] Don't touch description if tt snippets did nothing (#4264) This should prevent problems like the ones described in https://git.minetest.land/MineClone2/MineClone2/pulls/4196#issuecomment-77558 or https://git.minetest.land/MineClone2/MineClone2/pulls/4130#issuecomment-77571 Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/4264 Co-authored-by: the-real-herowl Co-committed-by: the-real-herowl --- mods/HELP/tt/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/mods/HELP/tt/init.lua b/mods/HELP/tt/init.lua index f2b83b612..b3f2b8d55 100644 --- a/mods/HELP/tt/init.lua +++ b/mods/HELP/tt/init.lua @@ -76,6 +76,7 @@ function tt.reload_itemstack_description(itemstack) orig_desc = minetest.colorize(tt.NAME_COLOR, meta:get_string("name")) end local desc = apply_snippets(orig_desc, itemstring, toolcaps or def.tool_capabilities, itemstack) + if desc == def.description and meta:get_string("description") == "" then return end meta:set_string("description", desc) end end