Implementation of a quality indicator after the name
This commit is contained in:
1 parent
d87605eecf
commit
5e2576fafd
2 files changed
+10
-2
No files matched your search
+4
-1
@@ -175,7 +175,10 @@ EID.UserConfig = {
|
|||||||
["ErrorColor"] = "ColorEIDError",
|
["ErrorColor"] = "ColorEIDError",
|
||||||
-- Enables or disables custom Descriptions for entities
|
-- Enables or disables custom Descriptions for entities
|
||||||
-- Default = true
|
-- Default = true
|
||||||
["EnableEntityDescriptions"] = true
|
["EnableEntityDescriptions"] = true,
|
||||||
|
-- Enables or disables item quality after item name
|
||||||
|
-- Default = true
|
||||||
|
["ShowQuality"] = true
|
||||||
}
|
}
|
||||||
|
|
||||||
--END CONFIG--
|
--END CONFIG--
|
||||||
|
|||||||
@@ -231,6 +231,7 @@ function EID:printDescription(desc)
|
|||||||
--Display Itemname
|
--Display Itemname
|
||||||
if EID.Config["ShowItemName"] then
|
if EID.Config["ShowItemName"] then
|
||||||
local curName = desc.Name
|
local curName = desc.Name
|
||||||
|
local quality = EID.itemWeightsLookup[tonumber(desc.ID)]
|
||||||
if EID.Config["TranslateItemName"] ~= 2 then
|
if EID.Config["TranslateItemName"] ~= 2 then
|
||||||
local curLanguage = EID.Config["Language"]
|
local curLanguage = EID.Config["Language"]
|
||||||
EID.Config["Language"] = "en_us"
|
EID.Config["Language"] = "en_us"
|
||||||
@@ -242,8 +243,12 @@ function EID:printDescription(desc)
|
|||||||
curName = curName.." ("..englishName..")"
|
curName = curName.." ("..englishName..")"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
local withQual = curName
|
||||||
|
if EID.Config["ShowQuality"] then
|
||||||
|
withQual = curName.." - "..quality
|
||||||
|
end
|
||||||
EID:renderString(
|
EID:renderString(
|
||||||
curName,
|
withQual,
|
||||||
renderPos + (Vector(offsetX, -3) * EID.Config["Scale"]),
|
renderPos + (Vector(offsetX, -3) * EID.Config["Scale"]),
|
||||||
textScale,
|
textScale,
|
||||||
EID:getNameColor()
|
EID:getNameColor()
|
||||||
|
|||||||
Reference in new issue
Block a user