Skip to content

Commit 1629aab

Browse files
committed
Always enable Custom mode
1 parent 2b1ce1a commit 1629aab

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
## Changelog ##
22
#### dev ####
33

4+
#### v2.9.1 ####
5+
* Patch to always enable Custom mode
6+
47
#### v2.9.0 ####
58
* Allow Prefix patches to skip the original method
69
* Allow Insert patches to skip the remainder of the original method

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<groupId>com.evacipated.cardcrawl</groupId>
55
<artifactId>ModTheSpire</artifactId>
6-
<version>2.9.0</version>
6+
<version>2.9.1</version>
77
<packaging>jar</packaging>
88

99
<name>ModTheSpire</name>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package com.evacipated.cardcrawl.modthespire.patches;
2+
3+
import com.evacipated.cardcrawl.modthespire.lib.SpirePatch;
4+
import javassist.CannotCompileException;
5+
import javassist.expr.ExprEditor;
6+
import javassist.expr.FieldAccess;
7+
8+
@SpirePatch(
9+
cls="com.megacrit.cardcrawl.screens.mainMenu.MenuPanelScreen",
10+
method="initializePanels"
11+
)
12+
public class AlwaysEnableCustomMode
13+
{
14+
public static ExprEditor Instrument()
15+
{
16+
return new ExprEditor() {
17+
@Override
18+
public void edit(FieldAccess f) throws CannotCompileException
19+
{
20+
if (f.getClassName().equals("com.megacrit.cardcrawl.screens.stats.CharStat")
21+
&& f.getFieldName().equals("highestDaily")) {
22+
f.replace("$_ = 1;");
23+
}
24+
}
25+
};
26+
}
27+
}

0 commit comments

Comments
 (0)