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 <wiktor_t-i@proton.me> Co-committed-by: the-real-herowl <wiktor_t-i@proton.me>world_aligned_textures
parent
4e12c6747c
commit
5f70189e08
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue