From a8a01e2ec62c4be7c8e21d5ae61ac1bb893eb5a1 Mon Sep 17 00:00:00 2001 From: smariot Date: Mon, 19 May 2008 10:19:39 -0400 Subject: [PATCH] Don't append the progress fraction if only one ithem is needed, it's either shown or it isn't. --- tracker.lua | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/tracker.lua b/tracker.lua index c31aeb0..ec79690 100644 --- a/tracker.lua +++ b/tracker.lua @@ -413,7 +413,7 @@ local function addobj(objective, seen, obj_index_lookup, filter, x, y, gap) table.sort(list) - local have = table.concat(list,",") + local have = table.concat(list, ", ") for i = #list,1,-1 do list[i] = nil @@ -423,12 +423,17 @@ local function addobj(objective, seen, obj_index_lookup, filter, x, y, gap) table.insert(list, val) end - table.sort(list) - - local need = table.concat(list,",") - - text = string.format((tonumber(have) and tonumber(need) and QUEST_ITEMS_NEEDED) or QUEST_FACTION_NEEDED, - text, have, need) + if #list ~= 1 or list[1] ~= 1 then + -- If there is only one thing needed, ignore the progress, it's redundant. + -- It's either shown or it isn't. + + table.sort(list) + + local need = table.concat(list, ", ") + + text = string.format((tonumber(have) and tonumber(need) and QUEST_ITEMS_NEEDED) or QUEST_FACTION_NEEDED, + text, have, need) + end QuestHelper:ReleaseTable(list) end -- 2.11.4.GIT