Added config option to display object ids in the description text
This commit is contained in:
1 parent
b60c32df85
commit
cee5f1c85d
3 files changed
+38
-1
No files matched your search
+6
-1
@@ -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,
|
||||
}
|
||||
@@ -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
|
||||
@@ -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-----------------------------------
|
||||
|
||||
|
||||
Reference in new issue
Block a user