Merge pull request #106 from Mrashes/Quality-Indicator
Implementation of a quality indicator after the name
This commit is contained in:
3 files changed
+31
-2
No files matched your search
+6
-2
@@ -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--
|
||||||
@@ -236,5 +239,6 @@ EID.DefaultConfig = {
|
|||||||
["ErrorMessage"] = "[Effect not defined]",
|
["ErrorMessage"] = "[Effect not defined]",
|
||||||
["TextColor"] = "ColorEIDText",
|
["TextColor"] = "ColorEIDText",
|
||||||
["ErrorColor"] = "ColorEIDError",
|
["ErrorColor"] = "ColorEIDError",
|
||||||
["EnableEntityDescriptions"] = true
|
["EnableEntityDescriptions"] = true,
|
||||||
|
["ShowQuality"] = true
|
||||||
}
|
}
|
||||||
@@ -245,6 +245,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 = tonumber(EID.itemConfig:GetCollectible(tonumber(desc.ID)).Quality)
|
||||||
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"
|
||||||
@@ -256,6 +257,9 @@ function EID:printDescription(desc)
|
|||||||
curName = curName.." ("..englishName..")"
|
curName = curName.." ("..englishName..")"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if EID.Config["ShowQuality"] then
|
||||||
|
curName = curName.." - {{Quality"..quality.."}}"
|
||||||
|
end
|
||||||
EID:renderString(
|
EID:renderString(
|
||||||
curName,
|
curName,
|
||||||
renderPos + (Vector(offsetX, -3) * EID.Config["Scale"]),
|
renderPos + (Vector(offsetX, -3) * EID.Config["Scale"]),
|
||||||
|
|||||||
@@ -776,6 +776,27 @@ if MCMLoaded then
|
|||||||
end
|
end
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
-------Quality ICON---------
|
||||||
|
MCM.AddSetting(
|
||||||
|
"EID",
|
||||||
|
"Visuals",
|
||||||
|
{
|
||||||
|
Type = ModConfigMenu.OptionType.BOOLEAN,
|
||||||
|
CurrentSetting = function()
|
||||||
|
return EID.Config["ShowQuality"]
|
||||||
|
end,
|
||||||
|
Display = function()
|
||||||
|
local onOff = "False"
|
||||||
|
if EID.Config["ShowQuality"] then
|
||||||
|
onOff = "True"
|
||||||
|
end
|
||||||
|
return "Display Qualtiy Info: " .. onOff
|
||||||
|
end,
|
||||||
|
OnChange = function(currentBool)
|
||||||
|
EID.Config["ShowQuality"] = currentBool
|
||||||
|
end
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
---------------------------------Visuals-----------------------------------
|
---------------------------------Visuals-----------------------------------
|
||||||
|
|||||||
Reference in new issue
Block a user