Added config option to display object ids in the description text

This commit is contained in:
Wofsauge committed 2021-09-18 17:38:55 +02:00
1 parent b60c32df85
commit cee5f1c85d
3 files changed
+38 -1

No files matched your search

+6 -1
View File
@@ -190,6 +190,10 @@ EID.UserConfig = {
-- Changes the number of Results shown for the additional Spindown dice description
-- Default = 3
["SpindownDiceResults"] = 3,
-- Show ID of described object in the format "Type.Variant.SubType" next to the name
-- Default = false
["ShowObjectID"] = false,
-- Error message displayed when an error occurs
-- Default = [Effect not defined]
@@ -274,5 +278,6 @@ EID.DefaultConfig = {
["TextColor"] = "ColorEIDText",
["ErrorColor"] = "ColorEIDError",
["EnableEntityDescriptions"] = true,
["ShowQuality"] = true
["ShowQuality"] = true,
["ShowObjectID"] = false,
}
+11
View File
@@ -137,4 +137,15 @@ local game = Game()
EID:addDescriptionModifier("Golden Trinket", GoldenTrinketCondition, GoldenTrinketCallback)
-- Handle ItemID
local function ItemIDCondition(descObj)
return EID.Config["ShowObjectID"] and descObj.ObjType > 0
end
local function ItemIDCallback(descObj)
descObj.Name = descObj.Name.."{{ColorGray}} "..descObj.ObjType.."."..descObj.ObjVariant.."."..descObj.ObjSubType
return descObj
end
EID:addDescriptionModifier("ItemID", ItemIDCondition, ItemIDCallback)
end
+21
View File
@@ -906,6 +906,27 @@ if MCMLoaded then
end
}
)
-------Object ID---------
MCM.AddSetting(
"EID",
"Visuals",
{
Type = ModConfigMenu.OptionType.BOOLEAN,
CurrentSetting = function()
return EID.Config["ShowObjectID"]
end,
Display = function()
local onOff = "False"
if EID.Config["ShowObjectID"] then
onOff = "True"
end
return "Display Object ID: " .. onOff
end,
OnChange = function(currentBool)
EID.Config["ShowObjectID"] = currentBool
end
}
)
---------------------------------------------------------------------------
---------------------------------Visuals-----------------------------------