Implementation of a quality indicator after the name

This commit is contained in:
mrashes committed 2021-05-26 22:00:23 -05:00
1 parent d87605eecf
commit 5e2576fafd
2 files changed
+10 -2

No files matched your search

+4 -1
View File
@@ -175,7 +175,10 @@ EID.UserConfig = {
["ErrorColor"] = "ColorEIDError",
-- Enables or disables custom Descriptions for entities
-- Default = true
["EnableEntityDescriptions"] = true
["EnableEntityDescriptions"] = true,
-- Enables or disables item quality after item name
-- Default = true
["ShowQuality"] = true
}
--END CONFIG--
+6 -1
View File
@@ -231,6 +231,7 @@ function EID:printDescription(desc)
--Display Itemname
if EID.Config["ShowItemName"] then
local curName = desc.Name
local quality = EID.itemWeightsLookup[tonumber(desc.ID)]
if EID.Config["TranslateItemName"] ~= 2 then
local curLanguage = EID.Config["Language"]
EID.Config["Language"] = "en_us"
@@ -242,8 +243,12 @@ function EID:printDescription(desc)
curName = curName.." ("..englishName..")"
end
end
local withQual = curName
if EID.Config["ShowQuality"] then
withQual = curName.." - "..quality
end
EID:renderString(
curName,
withQual,
renderPos + (Vector(offsetX, -3) * EID.Config["Scale"]),
textScale,
EID:getNameColor()