Skip to content

Commit d4ac897

Browse files
Added support for vanilla-style compound costs
1 parent 5dca636 commit d4ac897

File tree

68 files changed

+229
-23
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+229
-23
lines changed

InscryptionAPI/Helpers/TextureHelper.cs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ public enum SpriteType : int
8080
/// <summary>
8181
/// The texture for a button in Act 2 (same kind of button used for the hammer and activated sigils).
8282
/// </summary>
83-
PixelStandardButton = 12
83+
PixelStandardButton = 12,
84+
85+
Act2CostVanillaLeft = 13,
86+
87+
Act2CostVanillaRight = 14
8488
};
8589

8690
private static Vector2 DEFAULT_PIVOT = new(0.5f, 0.5f);
@@ -89,8 +93,8 @@ public enum SpriteType : int
8993

9094
private static readonly Dictionary<SpriteType, Rect> SPRITE_RECTS = new()
9195
{
92-
{ SpriteType.CardPortrait, new Rect(0.0f, 0.0f, 114.0f, 94.0f) },
93-
{ SpriteType.PixelPortrait, new Rect(0.0f, 0.0f, 41.0f, 28.0f) },
96+
{ SpriteType.CardPortrait, new Rect(0f, 0f, 114f, 94f) },
97+
{ SpriteType.PixelPortrait, new Rect(0f, 0f, 41f, 28f) },
9498
{ SpriteType.PixelAbilityIcon, new Rect(0f, 0f, 17f, 17f) },
9599
{ SpriteType.PixelStatIcon, new Rect(0f, 0f, 16f, 8f) },
96100
{ SpriteType.ChallengeIcon, new Rect(0f, 0f, 49f, 49f) },
@@ -101,7 +105,9 @@ public enum SpriteType : int
101105
{ SpriteType.StarterDeckIcon, new Rect(0f, 0f, 35f, 44f) },
102106
{ SpriteType.PixelDecal, new Rect(0f, 0f, 42f, 56f) },
103107
{ SpriteType.PixelActivatedAbilityIcon, new Rect(0f, 0f, 22f, 10f) },
104-
{ SpriteType.PixelStandardButton, new Rect(0f, 0f, 26f, 17f) }
108+
{ SpriteType.PixelStandardButton, new Rect(0f, 0f, 26f, 17f) },
109+
{ SpriteType.Act2CostVanillaLeft, new Rect(0f, 0f, 48f, 28f) }, // vanilla costs should have a creme border on the left and right so we don't need padding
110+
{ SpriteType.Act2CostVanillaRight, new Rect(0f, 0f, 48f, 28f) }
105111
};
106112

107113
private static readonly Dictionary<SpriteType, Vector2> SPRITE_PIVOTS = new()
@@ -118,7 +124,9 @@ public enum SpriteType : int
118124
{ SpriteType.StarterDeckIcon, DEFAULT_PIVOT },
119125
{ SpriteType.PixelDecal, DEFAULT_PIVOT },
120126
{ SpriteType.PixelActivatedAbilityIcon, DEFAULT_PIVOT },
121-
{ SpriteType.PixelStandardButton, new Vector2(0.5f, 0f) }
127+
{ SpriteType.PixelStandardButton, new Vector2(0.5f, 0f) },
128+
{ SpriteType.Act2CostVanillaLeft, new Vector2(0.58f, 0.77f) },
129+
{ SpriteType.Act2CostVanillaRight, new Vector2(0.75f, 0.77f) }
122130
};
123131

124132
/// <summary>

InscryptionAPI/InscryptionAPIPlugin.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class InscryptionAPIPlugin : BaseUnityPlugin
3030
{
3131
public const string ModGUID = "cyantist.inscryption.api";
3232
public const string ModName = "InscryptionAPI";
33-
public const string ModVer = "2.22.3";
33+
public const string ModVer = "2.22.4";
3434

3535
public static string Directory = "";
3636

229 Bytes
237 Bytes
233 Bytes
-80 Bytes
1.65 KB
1.78 KB
364 Bytes
359 Bytes

0 commit comments

Comments
 (0)