This repository was archived by the owner on Jan 17, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ buildscript{
2121plugins{
2222 java
2323 id(" com.github.GglLfr.EntityAnno" ) apply false
24+ id(" com.xpdustry.toxopid" ) version " 4.1.0"
2425}
2526
2627val arcVersion: String by project
@@ -52,6 +53,15 @@ fun entity(module: String): String{
5253 return " com.github.GglLfr.EntityAnno$module :$entVersion "
5354}
5455
56+ fun toxopid (module : String ): String {
57+ return " com.xpdustry.toxopid.spec.ModPlatform"
58+ }
59+
60+ toxopid {
61+ compileVersion = mindustryVersion
62+ runtimeVersion = mindustryVersion
63+ }
64+
5565allprojects{
5666 apply (plugin = " java" )
5767 sourceSets[" main" ].java.setSrcDirs(listOf (layout.projectDirectory.dir(" src" )))
Original file line number Diff line number Diff line change 44import arc .util .Log ;
55import arc .util .Reflect ;
66import biotech .content .BioFx ;
7- import biotech .ui .BioResearchDialog ;
7+ import biotech .type .unit .*;
8+ import biotech .ui .*;
89import biotech .world .blocks .enviroment .BiologicalStaticSpawner ;
910import mindustry .Vars ;
10- import mindustry .game .EventType ;
11+ import mindustry .game .* ;
1112import mindustry .gen .Building ;
1213import mindustry .gen .Groups ;
1314import mindustry .ui .fragments .MenuFragment ;
@@ -29,6 +30,11 @@ public static void init() {
2930 }
3031 });
3132
33+ Events .on (EventType .WaveEvent .class , event -> {
34+ if (Vars .state .rules .spawns .contains ( w -> w .type instanceof ShomeretUnitType )) BioVars .shomeretUI .begin ();
35+ });
36+
3237 Events .on (EventType .WorldLoadEvent .class , you -> BioVars .postInit ());
38+ Events .on (EventType .ClientLoadEvent .class , world -> BioVars .load ());
3339 }
3440}
Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ public static void loadMusic() {
6666
6767 void loadSettings () {
6868 ui .settings .addCategory (bundle .get ("setting.biotech-category" ), Icon .settings , t -> {
69+ t .checkPref ("biotech-bossbar-hides-menu" , true );
6970
7071 t .pref (new ButtonPref (bundle .get ("setting.biotech-clear-tech-tree" ), Icon .trash ,() -> {
7172 ui .showConfirm ("@confirm" , bundle .get ("setting.biotech-clear-tech-tree.confirm" ), () -> {
Original file line number Diff line number Diff line change 11package biotech ;
22
3- import biotech .ui .ShomeretUI ;
3+ import biotech .type .unit .*;
4+ import biotech .ui .*;
45import mindustry .Vars ;
56
67public class BioVars {
7- public static ShomeretUI shomeretUI = new ShomeretUI ();
8+ public static ShomeretUI shomeretUI = new ShomeretUI ();
9+ public static BioBossBarFragment bossBar = new BioBossBarFragment ();
810
9- public static void postInit () {
11+ public static void load (){
12+ bossBar .load (Vars .ui .hudGroup );
1013 shomeretUI .build (Vars .ui .hudGroup );
1114 }
15+
16+ public static void postInit () {
17+ bossBar .build ();
18+ }
1219}
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ public class ShomeretUnitType extends BiologicalUnitType {
1919 public static int state ;
2020 public static UnitType ima ;
2121
22- boolean cutsceneFinished = false ;
2322 int spawnCooldown = 10 * 60 ;
2423
2524 public ShomeretUnitType (String name ) {
@@ -112,11 +111,6 @@ public void init() {
112111 public void update (Unit unit ) {
113112 super .update (unit );
114113
115- if (!cutsceneFinished ) {
116- BioVars .shomeretUI .begin ();
117- cutsceneFinished = true ;
118- }
119-
120114 if (unit .health < unit .maxHealth / 2 && state == 0 ) state = 1 ;
121115
122116 //ima shitter
Original file line number Diff line number Diff line change 1+ package biotech .ui ;
2+
3+ import arc .*;
4+ import arc .func .*;
5+ import arc .graphics .g2d .*;
6+ import arc .scene .*;
7+ import arc .scene .ui .layout .*;
8+ import arc .util .*;
9+ import mindustry .*;
10+ import mindustry .graphics .*;
11+ import mindustry .ui .*;
12+
13+
14+ public class BioBossBarFragment {
15+ public Table bossBar = new Table ();
16+
17+ public boolean hide (){
18+ return !Core .settings .getBool ("biotech-bossbar-hides-menu" , true );
19+ }
20+
21+ public void load (Group parent ){
22+ Boolp prevHud = Vars .ui .hudGroup .find ("waves" ).visibility , prevMap = Vars .ui .hudGroup .find ("minimap/position" ).visibility ;
23+ if (!Vars .mobile ){ //dont softlock mobile players
24+ if (prevHud == null ) prevHud = () -> false ;
25+ Boolp finalprevHud = prevHud ;
26+ parent .find ("waves" ).visible ( () -> hide () && finalprevHud .get ());
27+ }
28+
29+ if (prevMap == null ) prevMap = () -> false ;
30+ Boolp finalprevMap = prevMap ;
31+ parent .find ("minimap/position" ).visible ( () -> hide () && finalprevMap .get ());
32+
33+ parent .fill ( p -> {
34+ p .name = "biotech-bossbar" ;
35+ p .align (Align .top ).setFillParent (true );
36+ p .add (bossBar ).visible (true ); //<- replace with the unit detection
37+ });
38+ }
39+
40+ public void build (){
41+ bossBar .clear ();;
42+ Bar bar = new Bar (
43+ () -> ">m< ow" ,
44+ () -> Pal .heal ,
45+ () -> Vars .player .unit () != null ? Vars .player .unit ().healthf () : 0f //<- replace this with the actually unit(s)
46+ ){
47+ @ Override
48+ public void draw (){
49+ //replace this with ur gorry image -rushie
50+ super .draw ();
51+ }
52+ };
53+ bossBar .add (bar ).minWidth (Core .graphics .getWidth () * 0.85f ).minHeight (50f ).pad (5f );
54+
55+ }
56+ }
You can’t perform that action at this time.
0 commit comments