Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuken authored Feb 6, 2025
2 parents 35bd2db + d030724 commit 456c171
Show file tree
Hide file tree
Showing 365 changed files with 14,339 additions and 7,512 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Run unit tests and build JAR
run: ./gradlew desktop:dist
- name: Upload desktop JAR for testing
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Desktop JAR (zipped)
path: desktop/build/libs/Mindustry.jar
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ See [CONTRIBUTING](CONTRIBUTING.md).
Bleeding-edge builds are generated automatically for every commit. You can see them [here](https://github.com/Anuken/MindustryBuilds/releases).

If you'd rather compile on your own, follow these instructions.
First, make sure you have [JDK 16-17](https://adoptium.net/archive.html?variant=openjdk17&jvmVariant=hotspot) installed. **Other JDK versions will not work.** Open a terminal in the Mindustry directory and run the following commands:
First, make sure you have [JDK 17](https://adoptium.net/archive.html?variant=openjdk17&jvmVariant=hotspot) installed. **Other JDK versions will not work.** Open a terminal in the Mindustry directory and run the following commands:

### Windows

Expand Down Expand Up @@ -53,6 +53,16 @@ To debug the application on a connected device/emulator, run `gradlew android:in

If the terminal returns `Permission denied` or `Command not found` on Mac/Linux, run `chmod +x ./gradlew` before running `./gradlew`. *This is a one-time procedure.*

#### Where is the `mindustry.gen` package?

As the name implies, `mindustry.gen` is generated *at build time* based on other code. You will not find source code for this package in the repository, and it should not be edited by hand.

The following is a non-exhaustive list of the "source" of generated code in `mindustry.gen`:

- `Call`, `*Packet` classes: Generated from methods marked with `@Remote`.
- All entity classes (`Unit`, `EffectState`, `Posc`, etc): Generated from component classes in the `mindustry.entities.comp` package, and combined using definitions in `mindustry.content.UnitTypes`.
- `Sounds`, `Musics`, `Tex`, `Icon`, etc: Generated based on files in the respective asset folders.

---

Gradle may take up to several minutes to download files. Be patient. <br>
Expand Down
4 changes: 4 additions & 0 deletions SERVERLIST.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Note: Server list review is currently on pause. No new servers will be merged until v8 is released!

*PRs to edit addresses of existing servers will still be accepted, although very infrequently.*

### Adding a server to the list

Mindustry now has a public list of servers that everyone can see and connect to.
Expand Down
3 changes: 2 additions & 1 deletion android/src/mindustry/android/AndroidLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected void onCreate(Bundle savedInstanceState){
UncaughtExceptionHandler handler = Thread.getDefaultUncaughtExceptionHandler();

Thread.setDefaultUncaughtExceptionHandler((thread, error) -> {
CrashSender.log(error);
CrashHandler.log(error);

//try to forward exception to system handler
if(handler != null){
Expand Down Expand Up @@ -110,6 +110,7 @@ void showFileChooser(boolean open, String title, Cons<Fi> cons, String... extens
Intent intent = new Intent(open ? Intent.ACTION_OPEN_DOCUMENT : Intent.ACTION_CREATE_DOCUMENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.setType(extension.equals("zip") && !open && extensions.length == 1 ? "application/zip" : "*/*");
intent.putExtra(Intent.EXTRA_TITLE, "export." + extension);

addResultListener(i -> startActivityForResult(intent, i), (code, in) -> {
if(code == Activity.RESULT_OK && in != null && in.getData() != null){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ public void process(RoundEnvironment env) throws Exception{
MethodSpec.Builder mbuilder = MethodSpec.methodBuilder(first.name()).addModifiers(first.is(Modifier.PRIVATE) ? Modifier.PRIVATE : Modifier.PUBLIC);
//if(isFinal || entry.value.contains(s -> s.has(Final.class))) mbuilder.addModifiers(Modifier.FINAL);
if(entry.value.contains(s -> s.has(CallSuper.class))) mbuilder.addAnnotation(CallSuper.class); //add callSuper here if necessary
if(first.has(Nullable.class)) mbuilder.addAnnotation(Nullable.class);
if(first.is(Modifier.STATIC)) mbuilder.addModifiers(Modifier.STATIC);
mbuilder.addTypeVariables(first.typeVariables().map(TypeVariableName::get));
mbuilder.returns(first.retn());
Expand Down
23 changes: 18 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript{
return "com.github.Anuken${localArc ? "" : ".Arc"}:$name:$arcHash"
}
}

repositories{
mavenLocal()
mavenCentral()
Expand All @@ -32,7 +32,7 @@ plugins{

allprojects{
apply plugin: 'maven-publish'

version = project.hasProperty("packageVersion") ? project.getProperty("packageVersion") : 'release'
group = 'com.github.Anuken'

Expand Down Expand Up @@ -89,6 +89,10 @@ allprojects{
return project.getProperties()["buildversion"]
}

getCommitHash = {
return 'git rev-parse --verify --short HEAD'.execute().text.trim()
}

getPackage = {
return project.ext.mainClassName.substring(0, project.ext.mainClassName.indexOf("desktop") - 1)
}
Expand Down Expand Up @@ -133,6 +137,10 @@ allprojects{
props["number"] = versionNumber
props["modifier"] = versionModifier
props["build"] = buildid
props["commitHash"] = "unknown"
if(project.hasProperty("showCommitHash")){
props["commitHash"] = getCommitHash()
}

props.store(pfile.newWriter(), "Autogenerated file. Do not modify.")
}
Expand Down Expand Up @@ -220,7 +228,7 @@ configure(subprojects - project(":annotations")){
tasks.withType(Javadoc){
options{
addStringOption('Xdoclint:none', '-quiet')
addStringOption('-release', '16')
addStringOption('-release', '17')
encoding('UTF-8')
}
}
Expand All @@ -243,6 +251,7 @@ project(":desktop"){
implementation "com.github.Anuken:steamworks4j:$steamworksVersion"

implementation arcModule("backends:backend-sdl")
annotationProcessor 'com.github.Anuken:jabel:0.9.0'
}
}

Expand All @@ -253,7 +262,7 @@ project(":core"){

kapt{
javacOptions{
option("-source", "16")
option("-source", "17")
option("-target", "1.8")
}
}
Expand Down Expand Up @@ -300,7 +309,7 @@ project(":core"){
task assetsJar(type: Jar, dependsOn: ":tools:pack"){
archiveClassifier = 'assets'
from files("assets"){
exclude "config", "cache", "music", "sounds"
exclude "config", "cache", "music", "sounds", "sprites/fallback"
}
}

Expand Down Expand Up @@ -372,6 +381,7 @@ project(":server"){
dependencies{
implementation project(":core")
implementation arcModule("backends:backend-headless")
annotationProcessor 'com.github.Anuken:jabel:0.9.0'
}
}

Expand Down Expand Up @@ -408,6 +418,9 @@ project(":tools"){
implementation arcModule("natives:natives-desktop")
implementation arcModule("natives:natives-freetype-desktop")
implementation arcModule("backends:backend-headless")

implementation("com.google.guava:guava:33.3.1-jre")
annotationProcessor 'com.github.Anuken:jabel:0.9.0'
}
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified core/assets-raw/sprites/blocks/drills/cliff-crusher-top.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions core/assets/baseparts/a single large power node.msch
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mschx��A
� F�_�ڴm7�D��raRѠ뗾������ތ�R� ���rz�PL��8�W � )�Ğ,z?��Ls��?Ph��p;
Expand Down
2 changes: 2 additions & 0 deletions core/assets/baseparts/a single surge tower.msch
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mschx�%�A
� @��Em;��D���#�i��������m��0ZS|tAL��S�-�a��eV�"��J(�yQ _���W� �
Expand Down
4 changes: 4 additions & 0 deletions core/assets/baseparts/battery node.msch
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
mschx�-��
@0F�)�G��H.���fӬ��Q����|hM��.4�II���`��ʹ��H[�@��,�D��������
�.��w�(�޽h�
�g�
Expand Down
Binary file added core/assets/baseparts/diffGen.msch
Binary file not shown.
Binary file added core/assets/baseparts/glassCannons.msch
Binary file not shown.
Binary file added core/assets/baseparts/impact.msch
Binary file not shown.
3 changes: 3 additions & 0 deletions core/assets/baseparts/impactMultiOutput.msch
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mschx�]�ێ�0����IS'[W��� H \".�Ļ���:t�(<oËp����KwE���i~�?c*iQܫNӛ��oM������nT��������:3Z��8;�ݑ�V�Ɍ� =�V�=�����Ϸ_�4�v����Ѫ�S�������W�-�VMw���̨�p�ɃrNO�����zT��T�o���M!3�Ô�fh��� >���Y�E�4�Y=���ɴ|u3��lmF�C�{����í�M[w�3���g���^ϝr���ɰ�캕ͽT�Q�q����<5�kuKO��"  �9�
m!TfW��@�uW^&ad��zy����� I+?+q���3�O$��E˰�ŶJ�������W���#R@xG �c�%�b�`1�W��YI��*B�a���IJ<�Z�����YB�"����V�}de�ː�!�����B�S��QvV�� �
MX�/CN�%�`�� ���X���y%G�s\ƅ׹�7�d�����M0�<�鎧9"��J����Q�K�0R�y��{=^(��M.^ |�׳�sچ��y���%^�D$ކD�%�&�/�FI�N€�y�����
Expand Down
Binary file added core/assets/baseparts/impactSmall.msch
Binary file not shown.
Binary file added core/assets/baseparts/pyraTurretsOne.msch
Binary file not shown.
Binary file added core/assets/baseparts/surgeTurretsOne.msch
Binary file not shown.
Loading

0 comments on commit 456c171

Please sign in to comment.