Added Config option to toggle Transformation progress

This commit is contained in:
Wofsauge committed 2022-03-19 02:50:55 +01:00
1 parent ef53c20396
commit e5f0b3c33e
4 files changed
+10 -1

No files matched your search

+3
View File
@@ -1435,6 +1435,9 @@ function EID:evaluateTransformationProgress(transformation)
EID.TransformationProgress[i] = {}
EID.TransformationProgress[i][transformation] = 0
local transformData = EID.TransformationData[transformation]
if not EID.TransformationLookup[transformation] then return end
if transformData and transformData.VanillaForm and player:HasPlayerForm(transformData.VanillaForm) then
EID.TransformationProgress[i][transformation] = transformData.NumNeeded or 3
else
+4
View File
@@ -177,6 +177,9 @@ EID.UserConfig = {
-- Toggle display of transformation icons
-- Default = true
["TransformationIcons"] = true,
-- Toggle display of transformation progress
-- Default = true
["TransformationProgress"] = true,
-- Set the color of the Transformation description text
-- Color names are defined in "eid_data.lua" (line 300)
-- Default = "ColorEIDTransform"
@@ -442,6 +445,7 @@ EID.DefaultConfig = {
["ShowObjectID"] = false,
["TransformationText"] = true,
["TransformationIcons"] = true,
["TransformationProgress"] = true,
["TransformationColor"] = "ColorEIDTransform",
["DisplayCardInfo"] = true,
["DisplayCardInfoShop"] = false,
+2 -1
View File
@@ -663,11 +663,12 @@ function EID:printDescription(desc, cachedID)
if EID.Config["TransformationText"] then
local transformationName = EID:getTransformationName(transform)
if true then
if EID.Config["TransformationProgress"] then
-- TODO: call evaluate only when ItemQueue of player changes to save performance
EID:evaluateTransformationProgress(transform)
local numCollected = EID.TransformationProgress[EID:getPlayerID(EID.player)][transform]
local numMax = EID.TransformationData[transform] and EID.TransformationData[transform].NumNeeded or 3
transformationName = transformationName.." ("..numCollected.."/"..numMax..")"
transformationName = transformationName.."("..numCollected.."/"..numMax..")"
end
local iconWidth = transformSprite[3] or -1
local iconHeight = transformSprite[4] or -1
+1
View File
@@ -525,6 +525,7 @@ if MCMLoaded then
EID:AddBooleanSetting("Visuals", "ShowItemIcon", "Display Item Icon")
EID:AddBooleanSetting("Visuals", "TransformationText", "Display Transformation Name")
EID:AddBooleanSetting("Visuals", "TransformationIcons", "Display Transformation Icon")
EID:AddBooleanSetting("Visuals", "TransformationProgress", "Display Transformation Progress")
EID:AddBooleanSetting("Visuals", "ShowQuality", "Display Quality Info", {repOnly = true})
EID:AddBooleanSetting("Visuals", "ShowObjectID", "Display Object ID")