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