Display mod name for modded items (+MCM support)

This commit is contained in:
Valentin Lampriere committed 2022-01-14 01:33:36 +01:00
1 parent 700ec2785b
commit fc477adc4f
4 files changed
+48 -5

No files matched your search

+15 -1
View File
@@ -57,6 +57,14 @@ local hudBBSprite = Sprite()
hudBBSprite:Load("gfx/eid_transform_icons.anm2", true)
hudBBSprite:Play("boundingBox")
EID._currentMod = ""
local OldRegisterMod = RegisterMod
RegisterMod = function (modName, apiVersion)
EID._currentMod = modName
return OldRegisterMod(modName, apiVersion)
end
------- Load all modules and other stuff ------
--transformation infos
@@ -361,6 +369,11 @@ function EID:printDescription(desc)
local quality = tonumber(EID.itemConfig:GetCollectible(tonumber(desc.ObjSubType)).Quality)
curName = curName.." - {{Quality"..quality.."}}"
end
if EID.Config["ShowModName"] and desc.ModName then
curName = curName .. " {{ColorWhite}}" .. desc.ModName
end
EID:renderString(
curName,
renderPos + (Vector(offsetX, -3) * EID.Scale),
@@ -398,6 +411,7 @@ function EID:printDescription(desc)
end
end
EID:printBulletPoints(desc.Description, renderPos)
end
function EID:printBulletPoints(description, renderPos)
@@ -1076,4 +1090,4 @@ end
if enableDebug then
require("eid_debugging")
end
end