From 1a140aed816401bb16b5826daf5774393f2861dd Mon Sep 17 00:00:00 2001 From: LoneWolfHT Date: Mon, 16 Jan 2023 13:35:11 -0800 Subject: [PATCH] Only give first line of markered item descriptions --- mods/ctf/ctf_modebase/markers.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/ctf/ctf_modebase/markers.lua b/mods/ctf/ctf_modebase/markers.lua index fc8373533b..d098ccdbc1 100644 --- a/mods/ctf/ctf_modebase/markers.lua +++ b/mods/ctf/ctf_modebase/markers.lua @@ -157,7 +157,8 @@ local function marker_func(name, param) local itemdef = minetest.registered_items[stack:get_name()] -- Fallback to itemstring if description doesn't exist - concat = itemdef.description or entity.itemstring + -- Only use first line of itemstring + concat = string.match(itemdef.description or entity.itemstring, "^([^\n]+)") concat = concat .. " " .. stack:get_count() end end