Skip to content

Commit

Permalink
Only give first line of markered item descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
LoneWolfHT committed Jan 16, 2023
1 parent f6caef7 commit 1a140ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mods/ctf/ctf_modebase/markers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1a140ae

Please sign in to comment.