From fe0f8fc4da66a80f3ec6d3ccb068b343441ed536 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Thu, 20 Jan 2022 00:04:10 -0500 Subject: [PATCH] add Up/Down arrows for glitched item attributes --- eid_api.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eid_api.lua b/eid_api.lua index 12c05697..852b9af1 100644 --- a/eid_api.lua +++ b/eid_api.lua @@ -906,8 +906,9 @@ function EID:CheckGlitchedItemConfig(id) if string.find(v, "Hearts") then val = val / 2 end -- the g flag removes .0 in numbers like 1.0 (caused by the hearts division) local s = string.format("%.4g",val) - if val > 0 then s = "+" .. s end - attributes = attributes .. string.gsub(localizedNames[v], "{1}", s) + local prefix = "↑ " + if val > 0 then s = "+" .. s else prefix = "↓ " end + attributes = attributes .. prefix .. string.gsub(localizedNames[v], "{1}", s) if val ~= 1 and val ~= -1 then attributes = attributes .. localizedNames["pluralize"] end attributes = attributes .. "#" end