Added charge indicator for timed and special charging items

This commit is contained in:
Wofsauge committed 2021-05-29 03:01:27 +02:00
1 parent 43b700bd93
commit 84dee07404
4 files changed
+25 -10

No files matched your search

+2 -2
View File
@@ -114,7 +114,7 @@ local repCollectibles={
[328] = {"328", "The Negative", "↑ +1.0 Damage up#Damages all enemies in the room when getting hit and at half a red heart or none"}, -- The Negative
[330] = {"330", "Soy Milk", "↑ Very high Tears up: (fire rate x 5.5)#↓ -80% Damage down#Drastically reduces knockback"}, -- Soy Milk
[331] = {"331", "Godhead", "Homing tears#↑ +0.5 Damage up#↑ +0.5 Range up#↓ -0.3 Tears down#↓ -0.3 Shot Speed down#↑ +0.8 Tear Height#Tears gain a damaging aura"}, -- Godhead
[336] = {"336", "Dead Onion", "Piercing + spectral tears#↓ -1.5 Range up#↓ -0.4 Shot Speed down#↑ +50% Tear size"}, -- Dead Onion
[336] = {"336", "Dead Onion", "Piercing + spectral tears#↓ -1.5 Range down#↓ -0.4 Shot Speed down#↑ +50% Tear size"}, -- Dead Onion
[339] = {"339", "Safety Pin", "↑ +1.5 Range up#↑ +0.16 Shot Speed up#+1 Black Heart#↑ +0.5 Tear Height"}, -- Safety Pin
[342] = {"342", "Blue Cap", "↑ +1 Health up#↑ +0.7 Tears up#↓ -16% Shot Speed down#Heals 2 red hearts"}, -- Blue Cap
[344] = {"344", "Match Book", "+1 Black Heart#Spawns 2-3 Bomb pickups#Spawns the Match Stick {{Trinket41}} Trinket"}, -- Match Book
@@ -497,7 +497,7 @@ local repCards={
[29] = {"29", "Ace of Spades", "Turns all pickups, chests and non-boss enemies into keys"}, -- Ace of Spades
[30] = {"30", "Ace of Hearts", "Turns all pickups, chests and non-boss enemies into hearts"}, -- Ace of Hearts
[39] = {"39", "Algiz", "Invincibility for 20 seconds"}, -- Algiz
[51] = {"51", "Holy Card", "Grants the Holy Mantle effect#(Next damage you take is 0)äEffect lasts until damage is taken"}, -- Holy card
[51] = {"51", "Holy Card", "Grants the Holy Mantle effect#(Next damage you take is 0)#Effect lasts until damage is taken"}, -- Holy card
[55] = {"55", "Rune Shard", "Activates a random rune effect#The rune effect is weaker"}, -- Rune Shard
[56] = {"56", "0 - The Fool?", "Drops all your hearts and pickups on the floor#Only half a heart left afterwards#Pickups can spawn as {{Collectible74}} {{Collectible19}} collectibles if amount is sufficient"}, -- 0 - The Fool?
+18 -5
View File
@@ -29,6 +29,8 @@ EID.IconSprite:Load("gfx/eid_transform_icons.anm2", true)
EID.InlineIconSprite = Sprite()
EID.InlineIconSprite:Load("gfx/eid_inline_icons.anm2", true)
EID.InlineIconSprite2 = Sprite()
EID.InlineIconSprite2:Load("gfx/eid_inline_icons.anm2", true)
EID.CardPillSprite = Sprite()
EID.CardPillSprite:Load("gfx/eid_cardspills.anm2", true)
@@ -218,11 +220,22 @@ function EID:printDescription(desc)
end
EID.IconSprite:Play(EID.ItemTypeAnm2Names[itemType])
EID:renderIcon(EID.IconSprite, renderPos.X + offsetX * EID.Config["Scale"], renderPos.Y + offsetY * EID.Config["Scale"])
if itemType == 3 then -- Display Charge
EID.IconSprite:Play(EID.itemConfig:GetCollectible(desc.ID).MaxCharges)
EID:renderIcon(EID.IconSprite, renderPos.X + offsetX * EID.Config["Scale"], renderPos.Y + offsetY * EID.Config["Scale"])
offsetX = offsetX + 11
elseif itemType == 4 then -- familiar
if itemType == 3 then
-- Display Charge
offsetX = offsetX + 1
local curItemConfig = EID.itemConfig:GetCollectible(desc.ID)
if REPENTANCE and curItemConfig.ChargeType == ItemConfig.CHARGE_TIMED then
EID.InlineIconSprite2:SetFrame("pickups", 10) -- Timer Icon
elseif REPENTANCE and (curItemConfig.ChargeType == ItemConfig.CHARGE_SPECIAL or desc.ID == CollectibleType.COLLECTIBLE_BLANK_CARD or desc.ID == CollectibleType.COLLECTIBLE_PLACEBO or
desc.ID == CollectibleType.COLLECTIBLE_CLEAR_RUNE or desc.ID == CollectibleType.COLLECTIBLE_D_INFINITY) then
EID.InlineIconSprite2:SetFrame("numbers", 13)
else
EID.InlineIconSprite2:SetFrame("numbers", curItemConfig.MaxCharges)
end
EID:renderIcon(EID.InlineIconSprite2, renderPos.X + offsetX * EID.Config["Scale"], renderPos.Y + offsetY * EID.Config["Scale"])
offsetX = offsetX + 8
elseif itemType == 4 then
-- familiar
offsetX = offsetX + 8
end
if not EID.Config["ShowItemName"] then
+5 -3
View File
@@ -1,5 +1,5 @@
<AnimatedActor>
<Info CreatedBy="Unknown" CreatedOn="28.05.2021 00:19:55" Version="57" Fps="30"/>
<Info CreatedBy="Unknown" CreatedOn="29.05.2021 02:39:39" Version="60" Fps="30"/>
<Content>
<Spritesheets>
<Spritesheet Path="eid_inline_icons.png" Id="0"/>
@@ -13,7 +13,7 @@
<Events/>
</Content>
<Animations DefaultAnimation="ERROR">
<Animation Name="numbers" FrameNum="13" Loop="false">
<Animation Name="numbers" FrameNum="14" Loop="false">
<RootAnimation>
<Frame XPosition="0" YPosition="0" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
</RootAnimation>
@@ -32,6 +32,7 @@
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="59" YCrop="0" Width="7" Height="7" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="67" YCrop="0" Width="7" Height="7" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="75" YCrop="0" Width="7" Height="7" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="82" YCrop="0" Width="7" Height="7" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
</LayerAnimation>
<LayerAnimation LayerId="1" Visible="true"/>
</LayerAnimations>
@@ -119,7 +120,7 @@
<NullAnimations/>
<Triggers/>
</Animation>
<Animation Name="pickups" FrameNum="10" Loop="false">
<Animation Name="pickups" FrameNum="11" Loop="false">
<RootAnimation>
<Frame XPosition="0" YPosition="0" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
</RootAnimation>
@@ -135,6 +136,7 @@
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="77" YCrop="43" Width="11" Height="11" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="88" YCrop="43" Width="9" Height="11" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="99" YCrop="43" Width="8" Height="11" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="110" YCrop="42" Width="8" Height="11" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
</LayerAnimation>
<LayerAnimation LayerId="1" Visible="true"/>
</LayerAnimations>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB