diff --git a/eid_config.lua b/eid_config.lua index 373f9bb4..9089de35 100644 --- a/eid_config.lua +++ b/eid_config.lua @@ -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, } \ No newline at end of file diff --git a/eid_modifiers.lua b/eid_modifiers.lua index a7e02ef4..9a1ca114 100644 --- a/eid_modifiers.lua +++ b/eid_modifiers.lua @@ -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 \ No newline at end of file diff --git a/mod_config_menu.lua b/mod_config_menu.lua index 087ddd38..e8981ba6 100644 --- a/mod_config_menu.lua +++ b/mod_config_menu.lua @@ -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-----------------------------------