Skip to content

Commit b0f27c9

Browse files
authored
Merge branch 'master' into pr-readwrite
2 parents d55a5dd + 848249a commit b0f27c9

File tree

432 files changed

+20177
-10811
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

432 files changed

+20177
-10811
lines changed

.github/workflows/pr.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Run unit tests and build JAR
2323
run: ./gradlew desktop:dist
2424
- name: Upload desktop JAR for testing
25-
uses: actions/upload-artifact@v2
25+
uses: actions/upload-artifact@v4
2626
with:
2727
name: Desktop JAR (zipped)
2828
path: desktop/build/libs/Mindustry.jar

README.md

+11-1

SERVERLIST.md

+4

android/src/mindustry/android/AndroidLauncher.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ protected void onCreate(Bundle savedInstanceState){
3838
UncaughtExceptionHandler handler = Thread.getDefaultUncaughtExceptionHandler();
3939

4040
Thread.setDefaultUncaughtExceptionHandler((thread, error) -> {
41-
CrashSender.log(error);
41+
CrashHandler.log(error);
4242

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

114115
addResultListener(i -> startActivityForResult(intent, i), (code, in) -> {
115116
if(code == Activity.RESULT_OK && in != null && in.getData() != null){

annotations/src/main/java/mindustry/annotations/Annotations.java

+7-9
Original file line numberDiff line numberDiff line change
@@ -182,18 +182,16 @@ public enum PacketPriority{
182182

183183
/** A set of two booleans, one specifying server and one specifying client. */
184184
public enum Loc{
185-
/** Method can only be invoked on the client from the server. */
185+
/** Server only. */
186186
server(true, false),
187-
/** Method can only be invoked on the server from the client. */
187+
/** Client only. */
188188
client(false, true),
189-
/** Method can be invoked from anywhere */
189+
/** Both server and client. */
190190
both(true, true),
191191
/** Neither server nor client. */
192192
none(false, false);
193193

194-
/** If true, this method can be invoked ON clients FROM servers. */
195194
public final boolean isServer;
196-
/** If true, this method can be invoked ON servers FROM clients. */
197195
public final boolean isClient;
198196

199197
Loc(boolean server, boolean client){
@@ -222,16 +220,16 @@ public enum Variant{
222220
@Target(ElementType.METHOD)
223221
@Retention(RetentionPolicy.SOURCE)
224222
public @interface Remote{
225-
/** Specifies the locations from which this method can be invoked. */
223+
/** Specifies the locations from which this method can cause remote invocations (This -> Remote) [Default: Server -> Client]. */
226224
Loc targets() default Loc.server;
227225

228-
/** Specifies which methods are generated. Only affects server-to-client methods. */
226+
/** Specifies which methods are generated. Only affects server-to-client methods (Server -> Client(s)) [Default: Server -> Client & Server -> All Clients]. */
229227
Variant variants() default Variant.all;
230228

231-
/** The local locations where this method is called locally, when invoked. */
229+
/** The locations where this method is called locally, when invoked locally (This -> This) [Default: No local invocations]. */
232230
Loc called() default Loc.none;
233231

234-
/** Whether to forward this packet to all other clients upon receival. Client only. */
232+
/** Whether the server should forward this packet to all other clients upon receival from a client (Client -> Server -> Other Clients). [Default: Don't Forward Client Invocations] */
235233
boolean forward() default false;
236234

237235
/**

annotations/src/main/java/mindustry/annotations/entity/EntityProcess.java

+1
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@ public void process(RoundEnvironment env) throws Exception{
445445
MethodSpec.Builder mbuilder = MethodSpec.methodBuilder(first.name()).addModifiers(first.is(Modifier.PRIVATE) ? Modifier.PRIVATE : Modifier.PUBLIC);
446446
//if(isFinal || entry.value.contains(s -> s.has(Final.class))) mbuilder.addModifiers(Modifier.FINAL);
447447
if(entry.value.contains(s -> s.has(CallSuper.class))) mbuilder.addAnnotation(CallSuper.class); //add callSuper here if necessary
448+
if(first.has(Nullable.class)) mbuilder.addAnnotation(Nullable.class);
448449
if(first.is(Modifier.STATIC)) mbuilder.addModifiers(Modifier.STATIC);
449450
mbuilder.addTypeVariables(first.typeVariables().map(TypeVariableName::get));
450451
mbuilder.returns(first.retn());

build.gradle

+18-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ buildscript{
1010
return "com.github.Anuken${localArc ? "" : ".Arc"}:$name:$arcHash"
1111
}
1212
}
13-
13+
1414
repositories{
1515
mavenLocal()
1616
mavenCentral()
@@ -32,7 +32,7 @@ plugins{
3232

3333
allprojects{
3434
apply plugin: 'maven-publish'
35-
35+
3636
version = project.hasProperty("packageVersion") ? project.getProperty("packageVersion") : 'release'
3737
group = 'com.github.Anuken'
3838

@@ -89,6 +89,10 @@ allprojects{
8989
return project.getProperties()["buildversion"]
9090
}
9191

92+
getCommitHash = {
93+
return 'git rev-parse --verify --short HEAD'.execute().text.trim()
94+
}
95+
9296
getPackage = {
9397
return project.ext.mainClassName.substring(0, project.ext.mainClassName.indexOf("desktop") - 1)
9498
}
@@ -133,6 +137,10 @@ allprojects{
133137
props["number"] = versionNumber
134138
props["modifier"] = versionModifier
135139
props["build"] = buildid
140+
props["commitHash"] = "unknown"
141+
if(project.hasProperty("showCommitHash")){
142+
props["commitHash"] = getCommitHash()
143+
}
136144

137145
props.store(pfile.newWriter(), "Autogenerated file. Do not modify.")
138146
}
@@ -220,7 +228,7 @@ configure(subprojects - project(":annotations")){
220228
tasks.withType(Javadoc){
221229
options{
222230
addStringOption('Xdoclint:none', '-quiet')
223-
addStringOption('-release', '16')
231+
addStringOption('-release', '17')
224232
encoding('UTF-8')
225233
}
226234
}
@@ -243,6 +251,7 @@ project(":desktop"){
243251
implementation "com.github.Anuken:steamworks4j:$steamworksVersion"
244252

245253
implementation arcModule("backends:backend-sdl")
254+
annotationProcessor 'com.github.Anuken:jabel:0.9.0'
246255
}
247256
}
248257

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

254263
kapt{
255264
javacOptions{
256-
option("-source", "16")
265+
option("-source", "17")
257266
option("-target", "1.8")
258267
}
259268
}
@@ -300,7 +309,7 @@ project(":core"){
300309
task assetsJar(type: Jar, dependsOn: ":tools:pack"){
301310
archiveClassifier = 'assets'
302311
from files("assets"){
303-
exclude "config", "cache", "music", "sounds"
312+
exclude "config", "cache", "music", "sounds", "sprites/fallback"
304313
}
305314
}
306315

@@ -372,6 +381,7 @@ project(":server"){
372381
dependencies{
373382
implementation project(":core")
374383
implementation arcModule("backends:backend-headless")
384+
annotationProcessor 'com.github.Anuken:jabel:0.9.0'
375385
}
376386
}
377387

@@ -408,6 +418,9 @@ project(":tools"){
408418
implementation arcModule("natives:natives-desktop")
409419
implementation arcModule("natives:natives-freetype-desktop")
410420
implementation arcModule("backends:backend-headless")
421+
422+
implementation("com.google.guava:guava:33.3.1-jre")
423+
annotationProcessor 'com.github.Anuken:jabel:0.9.0'
411424
}
412425
}
413426

-127 Bytes
-173 Bytes
-105 Bytes

core/assets/baseparts/1591381320600.msch

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
mschx�E��
2-
�0 �����`{�>T�A ��*�����g�@���.�Ơ�=o�n)��v쎣 ��A�l�M�,���S��&���N���s�/��jO1!�q` �K���,&�[��R���(O���6 E� * ?�ʻ.���>hRSɖ-�TQBTP5P�A����(�
1+
mschx�E��
2+
�0D�$FA(����ê�
3+
1Jb)��R�J��a��B-�- =�m�c n�MX-y��c 5�l�v{T�;�څ���ܓ5����e��M��f��m}�7n�ĺ��Ds1a}��\�"C�M�T�$�Q$�H�������!q����DG��J䲌"�!��oȔ�"�2�1�0[

core/assets/baseparts/a single large power node.msch

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
mschx��A
2+
� F�_�ڴm7�D��raRѠ뗾������ތ�R� ���rz�PL��8�W � )�Ğ,z?��Ls��?Ph��p;

core/assets/baseparts/a single surge tower.msch

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
mschx�%�A
2+
� @��Em;��D���#�i��������m��0ZS|tAL��S�-�a��eV�"��J(�yQ _���W� �
880 Bytes
Binary file not shown.

core/assets/baseparts/battery node.msch

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
mschx�-��
2+
@0F�)�G��H.���fӬ��Q����|hM��.4�II���`��ʹ��H[�@��,�D��������
3+
�.��w�(�޽h�
4+
�g�
482 Bytes
Binary file not shown.

core/assets/baseparts/daggersBunkerFour.msch

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
mschx�MQ˒�0��/�Γ�q���7��(���Hq��ZNj"�d;a?�o���p�bM���H���3ꞡm"��<(z�^��3��lv�d�*�{;�/��T6��]w:k�(��Z鞖�~}���r�Q��/(�>YZ {��P��ִj�MS��z����UGi������ZG�Μ�TS��(E"�
2+
���h{�Z9(��)b4�J\R�������J�k�5����g$�J}��A�ўq`l�z�������r��r�`sP�^����j\;�}����,�������ʗ.��������FW+t�>���E!J�Ds�_F�>�GW̙15���`�#q�� *
3+
@LCBQH=� �C%`N~�K�5�Zb �
4+
��xz�Q�7���)��4M�iz�Akls���Opzɶbֻ�R� �!�B%�YO!x��D�ٸo��OH9���(Y�&D0!� ���H�?ЏVL�8�N�م�z�Ł��A�ﱩܺ(��桩yhj~i�5<�� ����Y�,��t�W��a��u������
502 Bytes
Binary file not shown.
521 Bytes
Binary file not shown.

core/assets/baseparts/diffGen.msch

365 Bytes
Binary file not shown.
826 Bytes
Binary file not shown.
672 Bytes
Binary file not shown.
1.38 KB
Binary file not shown.

core/assets/baseparts/impact.msch

755 Bytes
Binary file not shown.
796 Bytes
Binary file not shown.
705 Bytes
Binary file not shown.
1.51 KB
Binary file not shown.

core/assets/baseparts/sixDaggers.msch

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
mschx�-PKN�0}��N�Bp�.X�-'`��%b��&
2+
r��qZz���8*3Ie93~�ޛ�`�M�ܩ��ݳr�w��E����Iu� h�����@i���Wo��?�& ���kԓ�^i\w�ON��FN�U4A��f�NEBN��UA�+)� ��;=�b�GR9���Uc�:�֢�˔$Ӹ�?9�if�f��JF6@�G����Bkh�{�H��N�\��W@F�r�_1-E��8��4#�8!+�l�!�������,��Č�9��M>5����)႓�ɂ�D���Ԕф�� T�/��%�Q��e82��3� X'.{Ra��5��e]�����J�4� gs�%]XA
351 Bytes
Binary file not shown.

core/assets/baseparts/sixDaggersSmallTwo.msch

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
mschx�-P;R�0}�Ŏ��g\Q��� @I� %C�X�cF�<����p� ��kedk��{��b�� ��;��gi�`��E���}�}�}��v��B{�F���g���j3�������U�q6�}�j��I�=.{�f���;��A��
2+
~���f�k܁�e笚��r+鎨G&�uJ��9��` '�TT�� Zmp��ړh���ݧ�m��wbr��4~K?R ��'g�����4 R$Q���0'�fm�(�l89CVe�?�N'��3h��/c}A��%�S�) �f�3]S<g�`/�� ��^����@����|yҒ�t��I�,W1�>?��5�]K�:�^v@���ixA;�?�1Y�
906 Bytes
Binary file not shown.
1.47 KB
Binary file not shown.
840 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)