2
2
3
3
import arc .*;
4
4
import arc .func .*;
5
- import arc .math .*;
6
5
import arc .util .*;
7
6
import mindustry .game .EventType .*;
8
7
import mindustry .gen .*;
9
8
import mindustry .mod .*;
10
9
import mindustry .mod .Mods .*;
11
- import mindustry .ui .dialogs .SettingsMenuDialog .*;
12
- import mindustry .ui .dialogs .SettingsMenuDialog .SettingsTable .*;
13
10
import mindustry .world .blocks .storage .CoreBlock .*;
14
11
import progressed .content .*;
15
12
import progressed .content .blocks .*;
@@ -35,7 +32,7 @@ public class ProgMats extends Mod{
35
32
public ProgMats (){
36
33
super ();
37
34
Events .on (ClientLoadEvent .class , e -> {
38
- loadSettings ();
35
+ PMSettings . init ();
39
36
PMPal .init ();
40
37
hints .load ();
41
38
});
@@ -138,47 +135,11 @@ public void loadContent(){
138
135
PMLoadouts .load ();
139
136
}
140
137
141
- void loadSettings (){
142
- ui .settings .addCategory (bundle .get ("setting.pm-title" ), "prog-mats-settings-icon" , t -> {
143
- t .pref (new Separator ("pm-graphics-settings" ));
144
- t .sliderPref ("pm-sword-opacity" , 100 , 20 , 100 , 5 , s -> s + "%" );
145
- t .sliderPref ("pm-zone-opacity" , 100 , 0 , 100 , 5 , s -> s + "%" );
146
- t .checkPref ("pm-tesla-range" , true );
147
- t .pref (new Separator ("pm-other-settings" ));
148
- t .checkPref ("pm-farting" , false , b -> Sounds .wind3 .play (Interp .pow2In .apply (Core .settings .getInt ("sfxvol" ) / 100f ) * 5f ));
149
- });
150
- }
151
-
152
138
public static boolean farting (){
153
139
return settings .getBool ("pm-farting" , false );
154
140
}
155
141
156
142
static boolean TUEnabled (){
157
143
return PMUtls .modEnabled ("test-utils" );
158
144
}
159
-
160
- static class Separator extends Setting {
161
- float height ;
162
-
163
- public Separator (String name ){
164
- super (name );
165
- }
166
-
167
- public Separator (float height ){
168
- this ("" );
169
- this .height = height ;
170
- }
171
-
172
- @ Override
173
- public void add (SettingsTable table ){
174
- if (name .isEmpty ()){
175
- table .image (Tex .clear ).height (height ).padTop (3f );
176
- }else {
177
- table .table (t -> {
178
- t .add (title ).padTop (3f );
179
- }).get ().background (Tex .underline );
180
- }
181
- table .row ();
182
- }
183
- }
184
145
}
0 commit comments