Skip to content

Commit

Permalink
fix sts v2.2 crash in death screens (fixes #587)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbjorge committed Dec 3, 2020
1 parent 5b8ed66 commit 68be74c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

### Bug fixes

* Compatibility with Slay the Spire v2.2 (fixes crash in death screens) (thanks A Cake Wearing A Hat and Celicath for reporting!)

## [v1.9.1] - 2020-11-01

### Bug fixes
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<SlayTheSpire.version>01-27-2020</SlayTheSpire.version>
<ModTheSpire.version>3.15.0</ModTheSpire.version>
<SlayTheSpire.version>11-29-2020</SlayTheSpire.version>
<ModTheSpire.version>3.18.0</ModTheSpire.version>

<!--
You need to set a STEAMAPPS_PATH environment variable to enable Maven to find the dependencies.
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/stsjorbsmod/patches/VoiceoverMasterPatch.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
import com.megacrit.cardcrawl.monsters.MonsterGroup;
import com.megacrit.cardcrawl.neow.NeowEvent;
import com.megacrit.cardcrawl.screens.DeathScreen;
import com.megacrit.cardcrawl.screens.GameOverScreen;
import com.megacrit.cardcrawl.screens.VictoryScreen;
import javassist.CannotCompileException;
import javassist.expr.ExprEditor;
import javassist.expr.FieldAccess;
Expand All @@ -40,7 +42,7 @@ public static MonsterGroup Postfix(MonsterGroup __originalRetVal, String key) {
public static class DeathScreen_ctor {
@SpirePostfixPatch
public static void Postfix(DeathScreen __this) {
VoiceoverMaster.playAfterDelay(__this.isVictory ? "death_victory" : "death", 2.0F);
VoiceoverMaster.playAfterDelay(DeathScreen.isVictory ? "death_victory" : "death", 2.0F);
}
}

Expand Down

0 comments on commit 68be74c

Please sign in to comment.