1+ using MelonLoader ;
2+ using UnityEngine ;
3+ using static SelectiveEffects . Managers . SettingsManager ;
4+
5+ namespace SelectiveEffects . Managers
6+ {
7+ internal class SettingsManager
8+ {
9+ internal static string SettingsPath = "UserData/SelectiveEffects.cfg" ;
10+
11+ //--------------------------------------------------------------------+
12+ // Main Category
13+ //--------------------------------------------------------------------+
14+ public static bool DisableAllEffects => MainCategory . _disableAllEffects . Value ;
15+
16+ internal class MainCategory
17+ {
18+ public static MelonPreferences_Entry < bool > _disableAllEffects ;
19+
20+ public static void Init ( )
21+ {
22+ MelonPreferences_Category mainCategory = MelonPreferences . CreateCategory ( "Main" ) ;
23+ mainCategory . SetFilePath ( SettingsPath ) ;
24+
25+ _disableAllEffects = mainCategory . CreateEntry < bool > ( "DisableAllEfects" , true , description : "Takes precedence to the following options" ) ;
26+ }
27+
28+ }
29+
30+ //--------------------------------------------------------------------+
31+ // Judgement Category
32+ //--------------------------------------------------------------------+
33+ public static bool DisableJudgement => JudgementCategory . _disableJudgement . Value ;
34+ public static bool MakeJudgementSmaller => JudgementCategory . _makeJudgementSmaller . Value ;
35+
36+ internal class JudgementCategory
37+ {
38+ public static MelonPreferences_Entry < bool > _disableJudgement ;
39+ public static MelonPreferences_Entry < bool > _makeJudgementSmaller ;
40+
41+ public static void Init ( )
42+ {
43+ MelonPreferences_Category judgementCategory = MelonPreferences . CreateCategory ( "Judgement" ) ;
44+ judgementCategory . SetFilePath ( SettingsPath ) ;
45+
46+ _disableJudgement = judgementCategory . CreateEntry < bool > ( "DisableJudgement" , false ) ;
47+ _makeJudgementSmaller = judgementCategory . CreateEntry < bool > ( "MakeJudgementSmaller" , false , description : "DisableJudgement takes precedence." ) ;
48+ }
49+ }
50+
51+ //--------------------------------------------------------------------+
52+ // Hit Category
53+ //--------------------------------------------------------------------+
54+ public static bool DisableHitDissapearAnimations => HitCategory . _disableHitDissapearAnimations . Value ;
55+ public static bool DisableHitEffects => HitCategory . _disableHitEffects . Value ;
56+ public static bool DisableGirlFxAtk => HitCategory . _disableGirlFxAtk . Value ;
57+ public static bool DisablePressFx => HitCategory . _disablePressFx . Value ;
58+
59+ internal class HitCategory
60+ {
61+ public static MelonPreferences_Entry < bool > _disableHitDissapearAnimations ;
62+ public static MelonPreferences_Entry < bool > _disableHitEffects ;
63+ public static MelonPreferences_Entry < bool > _disableGirlFxAtk ;
64+ public static MelonPreferences_Entry < bool > _disablePressFx ;
65+
66+ public static void Init ( )
67+ {
68+ MelonPreferences_Category hitCategory = MelonPreferences . CreateCategory ( "Hit" ) ;
69+ hitCategory . SetFilePath ( SettingsPath ) ;
70+
71+ _disableHitDissapearAnimations = hitCategory . CreateEntry < bool > ( "DisableHitDissapearAnimations" , false , description : "Hit enemies disappear immeadiatly." ) ;
72+ _disableHitEffects = hitCategory . CreateEntry < bool > ( "DisableHitEffects" , false ) ;
73+ _disableGirlFxAtk = hitCategory . CreateEntry < bool > ( "DisableGirlHitFx" , false ) ;
74+ _disablePressFx = hitCategory . CreateEntry < bool > ( "DisablePressFx" , false ) ;
75+ }
76+ }
77+
78+ //--------------------------------------------------------------------+
79+ // Music notes & Hearts Category
80+ //--------------------------------------------------------------------+
81+ public static bool DisableMusicNotesFx => MusicHeartsCategory . _disableMusicNotesFx . Value ;
82+ public static bool DisableHeartsFx => MusicHeartsCategory . _disableHeartsFx . Value ;
83+
84+ internal class MusicHeartsCategory
85+ {
86+ public static MelonPreferences_Entry < bool > _disableMusicNotesFx ;
87+ public static MelonPreferences_Entry < bool > _disableHeartsFx ;
88+
89+ public static void Init ( )
90+ {
91+ MelonPreferences_Category musicHeartsCategory = MelonPreferences . CreateCategory ( "MusicHearts" ) ;
92+ musicHeartsCategory . SetFilePath ( SettingsPath ) ;
93+
94+ _disableMusicNotesFx = musicHeartsCategory . CreateEntry < bool > ( "DisableMusicNotesFx" , false , description : "Disable music notes points text." ) ;
95+ _disableHeartsFx = musicHeartsCategory . CreateEntry < bool > ( "DisablHeartsFx" , false , description : "Disable hearts health gain text." ) ;
96+ }
97+ }
98+
99+ public static bool DisableBossFx => MiscCategory . _disableBossFx . Value ;
100+ public static bool DisableDustFx => MiscCategory . _disableDustFx . Value ;
101+ public static bool DisableHurtFx => MiscCategory . _disableHurtFx . Value ;
102+
103+ internal class MiscCategory
104+ {
105+ public static MelonPreferences_Entry < bool > _disableBossFx ;
106+ public static MelonPreferences_Entry < bool > _disableDustFx ;
107+ public static MelonPreferences_Entry < bool > _disableHurtFx ;
108+
109+ public static void Init ( )
110+ {
111+ MelonPreferences_Category miscCategory = MelonPreferences . CreateCategory ( "Misc" ) ;
112+ miscCategory . SetFilePath ( SettingsPath ) ;
113+
114+ _disableBossFx = miscCategory . CreateEntry < bool > ( "DisableBossFx" , false ) ;
115+ _disableDustFx = miscCategory . CreateEntry < bool > ( "DisableDustFx" , false ) ;
116+ _disableHurtFx = miscCategory . CreateEntry < bool > ( "DisableHurtFx" , false , description : "Disable hp loss text-" ) ;
117+ }
118+ }
119+
120+ public static bool DisableHitEnemy => DisableHitDissapearAnimations && DisableHitEffects ;
121+
122+ internal static void Load ( )
123+ {
124+ MainCategory . Init ( ) ;
125+ JudgementCategory . Init ( ) ;
126+ HitCategory . Init ( ) ;
127+ MusicHeartsCategory . Init ( ) ;
128+ MiscCategory . Init ( ) ;
129+ }
130+ }
131+ }
0 commit comments