Added support for golden Trinkets
This commit is contained in:
1 parent
13664ce393
commit
420fe046d4
4 files changed
+37
-2
No files matched your search
@@ -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
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user