Skip to content

Commit

Permalink
vanquish
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo-MathGuy committed Mar 29, 2024
1 parent 904f147 commit dcc09ab
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 20 deletions.
11 changes: 8 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@

"features": {
"ghcr.io/devcontainers/features/java:1": {
"version": "none",
"installMaven": "true",
"installGradle": "true"
"installGradle": true,
"installMaven": true,
"version": "17",
"jdkDistro": "ms",
"gradleVersion": "latest",
"mavenVersion": "latest",
"antVersion": "latest",
"groovyVersion": "latest"
}
}

Expand Down
14 changes: 7 additions & 7 deletions mod.hjson
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
#the mod name as displayed in-game
displayName: "Java Mod Template"
displayName: "Mindsutry"

#the internal name of your mod
name: "example-java-mod"
name: "mindustry"

#your name
author: "You"
author: "LeoMathGuy"

#the fully qualified main class of the mod
main: "example.ExampleJavaMod"
main: "java.Mindsutry"

#the mod description as seen in the mod dialog
description: "A Mindustry Java mod template."
description: "Stupid stuff"

#the mod version
version: 1.0
version: 6.9

#the minimum game build required to run this mod
minGameVersion: 145
minGameVersion: 146

#this is a java mod
java: true
3 changes: 3 additions & 0 deletions src/content/units/vanquish.hjson
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
type: TankUnitType
name: "vanquish"
health: 100000
13 changes: 3 additions & 10 deletions src/example/ExampleJavaMod.java → src/java/Mindsutry.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,18 @@
public class ExampleJavaMod extends Mod{

public ExampleJavaMod(){
Log.info("Loaded ExampleJavaMod constructor.");
Log.info("Loaded Mindsutry");

//listen for game load event
Events.on(ClientLoadEvent.class, e -> {
//show dialog upon startup
Time.runTask(10f, () -> {
BaseDialog dialog = new BaseDialog("frog");
dialog.cont.add("behold").row();
//mod sprites are prefixed with the mod name (this mod is called 'example-java-mod' in its config)
dialog.cont.image(Core.atlas.find("example-java-mod-frog")).pad(20f).row();
dialog.cont.button("I see", dialog::hide).size(100f, 50f);
dialog.cont.add("Impostor sus me harder").row();
dialog.cont.button("[scarlet]Eat the impostor", dialog::hide).size(400f, 25f);
dialog.show();
});
});
}

@Override
public void loadContent(){
Log.info("Loading some example content.");
}

}

0 comments on commit dcc09ab

Please sign in to comment.