Skip to content

Commit ce8114a

Browse files
committed
Add black hole renderer to dependencies
1 parent 1f544ce commit ce8114a

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

mod.hjson

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
"author": "MEEP of Faith (And a bunch of contributors. Load the game with Meepscillanious Concepts enabled to view them!)",
88
"java": true,
99
"main": "progressed.ProgMats",
10-
"repo": "MEEPofFaith/prog-mats-java"
10+
"repo": "MEEPofFaith/prog-mats-java",
11+
"dependencies": ["black-hole-renderer"]
1112
}

src/progressed/ProgMats.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import progressed.graphics.renders.*;
2121
import progressed.ui.*;
2222
import progressed.ui.dialogs.*;
23+
import progressed.util.*;
2324
import progressed.world.blocks.defence.turret.payload.modular.*;
2425

2526
import static arc.Core.*;
@@ -152,8 +153,7 @@ public static boolean farting(){
152153
}
153154

154155
static boolean TUEnabled(){
155-
LoadedMod testUtils = mods.getMod("test-utils");
156-
return testUtils != null && testUtils.isSupported() && testUtils.enabled();
156+
return PMUtls.modEnabled("test-utils");
157157
}
158158

159159
static class Separator extends Setting{

src/progressed/util/PMUtls.java

+7
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
import arc.math.*;
44
import arc.struct.*;
55
import arc.util.*;
6+
import mindustry.*;
67
import mindustry.content.*;
78
import mindustry.core.*;
89
import mindustry.entities.bullet.*;
910
import mindustry.gen.*;
11+
import mindustry.mod.Mods.*;
1012
import mindustry.type.*;
1113
import mindustry.world.*;
1214
import progressed.entities.bullet.energy.*;
@@ -117,6 +119,11 @@ public static String round(float f){
117119
}
118120
}
119121

122+
public static boolean modEnabled(String name){
123+
LoadedMod mod = Vars.mods.getMod(name);
124+
return mod != null && mod.isSupported() && mod.enabled();
125+
}
126+
120127
public static void uhOhSpeghettiOh(String ohno){
121128
throw new RuntimeException(ohno);
122129
}

0 commit comments

Comments
 (0)