Added support for golden Trinkets

This commit is contained in:
Wofsauge committed 2021-05-15 16:34:03 +02:00
1 parent 13664ce393
commit 420fe046d4
4 files changed
+37 -2

No files matched your search

+2
View File
@@ -407,6 +407,8 @@ local repTrinkets={
}
EID:updateDescriptionsViaTable(repTrinkets, EID.descriptions["en_us"].trinkets)
EID.descriptions["en_us"].goldenTrinket = "GOLD: Doubled Effect!"
---------- Cards ----------
local repCards={
[27] = {"27", "", "Turns all pickups, chests and non-boss enemies into bombs"},
+1 -1
View File
@@ -62,7 +62,7 @@ EID.DefaultConfig = {
["DisableOnCurse"] = true,
-- Disable Item informations for the second Treasure room item on alt paths
-- Default = true
["DisableOnAltPath"] = true -- CURRENTLY NOT WORKING!
["DisableOnAltPath"] = true, -- CURRENTLY NOT WORKING!
----------ITEM NAMES-----------
-- Toggle Display of Collectible / Card and Pill names
+22
View File
@@ -237,6 +237,28 @@ EID.InlineColors = {
(animTime % (colorFractions + 1)) / colorFractions
)
end,
-- Rainbow color effect
["ColorGold"] = function(_)
local maxAnimTime = 80
local animTime = Game():GetFrameCount() % maxAnimTime
local c = EID.InlineColors
local colors = {c["ColorYellow"], c["ColorOrange"]}
local colorFractions = (maxAnimTime - 1) / #colors
local subAnm = math.floor(animTime / (colorFractions + 1)) + 1
local primaryColorIndex = subAnm % (#colors + 1)
if primaryColorIndex == 0 then
primaryColorIndex = 1
end
local secondaryColorIndex = (subAnm + 1) % (#colors + 1)
if secondaryColorIndex == 0 then
secondaryColorIndex = 1
end
return EID:interpolateColors(
colors[primaryColorIndex],
colors[secondaryColorIndex],
(animTime % (colorFractions + 1)) / colorFractions
)
end,
-- Text will blink frequently
["ColorBlink"] = function(color)
local maxAnimTime = 40
+12 -1
View File
@@ -476,7 +476,18 @@ local function onRender(t)
if closest.Variant == PickupVariant.PICKUP_TRINKET then
--Handle Trinkets
EID:printDescription(EID:getDescriptionObj(closest.Type, closest.Variant, closest.SubType))
local trinketID = closest.SubType
local isGoldenTrinket = false
if trinketID > 32768 then
trinketID = trinketID - 32768
isGoldenTrinket = true
end
local descriptionObj = EID:getDescriptionObj(closest.Type, closest.Variant, trinketID)
if isGoldenTrinket then
local goldenDesc = EID.descriptions[EID.Config["Language"]].goldenTrinket or EID.descriptions["en_us"].goldenTrinket or ""
descriptionObj.Description = "{{ColorGold}}"..goldenDesc.."#"..descriptionObj.Description
end
EID:printDescription(descriptionObj)
elseif closest.Variant == PickupVariant.PICKUP_COLLECTIBLE then
--Handle Collectibles
if EID:hasCurseBlind() and EID.Config["DisableOnCurse"] then