File tree Expand file tree Collapse file tree 3 files changed +31
-1
lines changed
src/main/java/com/evacipated/cardcrawl/modthespire/patches Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments