Skip to content

Commit 551cde0

Browse files
committed
Allow for custom ghost mini hearts
1 parent 5dc9683 commit 551cde0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Entities/AbstractMiniHeart.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ public override void Awake(Scene scene) {
5050
string spritePath = "CollabUtils2/miniheart/" + spriteName + "/";
5151
bool alreadyCollectedInSave = SaveData.Instance.Areas_Safe[area.ID].Modes[(int) area.Mode].HeartGem;
5252
if (alreadyCollectedInSave) {
53-
spritePath = "CollabUtils2/miniheart/ghost/ghost";
53+
// use the ghost sprite specific to the heart: instead of reading 00.png, read ghost00.png
54+
spritePath += "ghost";
55+
if (!GFX.Game.Has(spritePath + "00")) {
56+
// if those sprites are missing, use the default ghost heart instead
57+
spritePath = "CollabUtils2/miniheart/ghost/ghost";
58+
}
5459
}
5560

5661
Add(sprite = new Sprite(GFX.Game, spritePath));

everest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
- Name: CollabUtils2
2-
Version: 1.4.8
2+
Version: 1.5.0
33
DLL: bin/Debug/net452/CollabUtils2.dll
44
Dependencies:
55
- Name: Everest

0 commit comments

Comments
 (0)