Merge branch 'master' into patch-1
10
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -7,17 +7,21 @@ assignees: ''
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
**Note**: Do not report any new bugs directly relating to the v6 campaign. They will not be fixed or considered at this time.
|
||||||
|
|
||||||
**Platform**: *Android/iOS/Mac/Windows/Linux*
|
**Platform**: *Android/iOS/Mac/Windows/Linux*
|
||||||
|
|
||||||
**Build**: *The build number under the title in the main menu. Required.*
|
**Build**: *The build number under the title in the main menu. Required.*
|
||||||
|
|
||||||
**Issue**: *Explain your issue in detail.*
|
**Issue**: *Explain your issue in detail.*
|
||||||
|
|
||||||
**Steps to reproduce**: *How you happened across the issue, and what you were doing at the time.*
|
**Steps to reproduce**: *How you happened across the issue, and what exactly you did to make the bug happen.*
|
||||||
|
|
||||||
**Link to mod(s) used, if applicable**: *The mod repositories or zip files that are related to the issue.*
|
**Link(s) to mod(s) used**: *The mod repositories or zip files that are related to the issue, if applicable.*
|
||||||
|
|
||||||
**Crash report, if applicable**: *The contents of relevant crash report files.*
|
**Save file**: *The save file you were playing on when the bug happened. REQUIRED for any issue that happens in-game.*
|
||||||
|
|
||||||
|
**Crash report**: *The contents of relevant crash report files. REQUIRED if you are reporting a crash.*
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
6
.gitignore
vendored
@@ -79,9 +79,11 @@ com_crashlytics_export_strings.xml
|
|||||||
/android/bin/
|
/android/bin/
|
||||||
/core/bin/
|
/core/bin/
|
||||||
/desktop/bin/
|
/desktop/bin/
|
||||||
/html/bin/
|
|
||||||
/ios/bin/
|
/ios/bin/
|
||||||
/ios-moe/bin/
|
/annotations/bin/
|
||||||
|
/server/bin/
|
||||||
|
/tests/bin/
|
||||||
|
/tools/bin/
|
||||||
*.tmp
|
*.tmp
|
||||||
*.bak
|
*.bak
|
||||||
*.swp
|
*.swp
|
||||||
|
|||||||
11
.travis.yml
@@ -26,6 +26,7 @@ script:
|
|||||||
- cp -a Mindustry/core/build/docs/javadoc/. docs/
|
- cp -a Mindustry/core/build/docs/javadoc/. docs/
|
||||||
- cd docs
|
- cd docs
|
||||||
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git add .; git commit -m "Update ${TRAVIS_BUILD_NUMBER}"; git push https://Anuken:${GH_PUSH_TOKEN}@github.com/MindustryGame/docs; fi
|
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git add .; git commit -m "Update ${TRAVIS_BUILD_NUMBER}"; git push https://Anuken:${GH_PUSH_TOKEN}@github.com/MindustryGame/docs; fi
|
||||||
|
- cd ../Mindustry
|
||||||
deploy:
|
deploy:
|
||||||
- provider: releases
|
- provider: releases
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
@@ -38,11 +39,11 @@ deploy:
|
|||||||
on:
|
on:
|
||||||
repo: Anuken/Mindustry
|
repo: Anuken/Mindustry
|
||||||
tags: true
|
tags: true
|
||||||
- provider: script
|
#- provider: script
|
||||||
script: bash update_wiki.sh
|
# script: bash update_wiki.sh
|
||||||
on:
|
# on:
|
||||||
repo: Anuken/Mindustry
|
# repo: Anuken/Mindustry
|
||||||
tags: true
|
# tags: true
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- secure: TqlUl/ojjkCMVOGbCTKz7Cnr4F08UyWzY/CiJ0vvUOGJGZ1qm7XavAlDf5XT0egU4mvr37THubFO8vojbqmrmy0oZnYh3njKFA8axgyZ8PyKkjGHOfd0i6qyEWsOr9H90/2X8r3LwEeLaDFyHpu3wljIGBjweg53g2qwmDwCFa9UR80FJZ+xDB+rD6B3cXT0DTEkCoLZXLqXm0Y3HvBdSuBL1LR/FNb2BSxNq+tNLGiz1kdQZV5erausbbZypBoGxzz63xAnyz2kkFz73A8xQYVTzGbFodTPz7HM13GVZ5s43I03Y+HYyHBgBaSLziO2hi2kzVJccOwzBp7wS4fs1MqsFY5+IeWJ9k+hm89NiYT7+6zlEgoUMlIniny1qLqWTzx7btUeuC/y/h5TVBNgaV+z0jmHycHfeSyq5I+vmX4J8qe3wmaN8TcdqYKU5nIznOTk3CM5Fzu0Bs9vkCkOxmormmcjMFW1RbdOLc/hpZWZggsBA88sNEAI8eq+r5QEeqzeCx8YKoZDjdrsqvgLMc3El3gS9oMGxkn0Y/TEcqs9Tc4BXtTkqIA68hD0DYzlAxYjVbbkAI9Hh9lHNvV3Dr/oCkGXQ/HflM143kj1L3tSBZpqeqQE2XhngB5nqpS3OZTmZbMTQ8qD2luU18yaTGMLF5tJS/fdKPRx0gQ1kL8=
|
- secure: TqlUl/ojjkCMVOGbCTKz7Cnr4F08UyWzY/CiJ0vvUOGJGZ1qm7XavAlDf5XT0egU4mvr37THubFO8vojbqmrmy0oZnYh3njKFA8axgyZ8PyKkjGHOfd0i6qyEWsOr9H90/2X8r3LwEeLaDFyHpu3wljIGBjweg53g2qwmDwCFa9UR80FJZ+xDB+rD6B3cXT0DTEkCoLZXLqXm0Y3HvBdSuBL1LR/FNb2BSxNq+tNLGiz1kdQZV5erausbbZypBoGxzz63xAnyz2kkFz73A8xQYVTzGbFodTPz7HM13GVZ5s43I03Y+HYyHBgBaSLziO2hi2kzVJccOwzBp7wS4fs1MqsFY5+IeWJ9k+hm89NiYT7+6zlEgoUMlIniny1qLqWTzx7btUeuC/y/h5TVBNgaV+z0jmHycHfeSyq5I+vmX4J8qe3wmaN8TcdqYKU5nIznOTk3CM5Fzu0Bs9vkCkOxmormmcjMFW1RbdOLc/hpZWZggsBA88sNEAI8eq+r5QEeqzeCx8YKoZDjdrsqvgLMc3El3gS9oMGxkn0Y/TEcqs9Tc4BXtTkqIA68hD0DYzlAxYjVbbkAI9Hh9lHNvV3Dr/oCkGXQ/HflM143kj1L3tSBZpqeqQE2XhngB5nqpS3OZTmZbMTQ8qD2luU18yaTGMLF5tJS/fdKPRx0gQ1kL8=
|
||||||
|
|||||||
@@ -68,3 +68,6 @@ If something needs to be encapsulated in the future, IntelliJ can handle it with
|
|||||||
|
|
||||||
#### Do not create methods unless necessary.
|
#### Do not create methods unless necessary.
|
||||||
Unless a block of code is very large or used in more than 1-2 places, don't split it up into a separate method. Making unnecessary methods only creates confusion, and may slightly decrease performance.
|
Unless a block of code is very large or used in more than 1-2 places, don't split it up into a separate method. Making unnecessary methods only creates confusion, and may slightly decrease performance.
|
||||||
|
|
||||||
|
## Other Notes
|
||||||
|
If you would like your name to appear in the game's credits, add it to the [list of contributors](https://github.com/Anuken/Mindustry/blob/master/core/assets/contributors) as part of your PR.
|
||||||
|
|||||||
17
README.md
@@ -15,16 +15,16 @@ See [CONTRIBUTING](CONTRIBUTING.md).
|
|||||||
|
|
||||||
### Building
|
### Building
|
||||||
|
|
||||||
Bleeding-edge live builds are generated automatically for every commit. You can see them [here](https://github.com/Anuken/MindustryBuilds/releases). Old builds might still be on [jenkins](https://jenkins.hellomouse.net/job/mindustry/).
|
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.
|
If you'd rather compile on your own, follow these instructions.
|
||||||
First, make sure you have [JDK 14](https://adoptopenjdk.net/) installed. Open a terminal in the root directory, `cd` to the Mindustry folder and run the following commands:
|
First, make sure you have [JDK 14](https://adoptopenjdk.net/) installed. Open a terminal in the root directory, `cd` to the Mindustry folder and run the following commands:
|
||||||
|
|
||||||
#### Windows
|
#### Windows
|
||||||
|
|
||||||
_Running:_ `gradlew.bat desktop:run`
|
_Running:_ `gradlew desktop:run`
|
||||||
_Building:_ `gradlew.bat desktop:dist`
|
_Building:_ `gradlew desktop:dist`
|
||||||
_Sprite Packing:_ `gradlew.bat tools:pack`
|
_Sprite Packing:_ `gradlew tools:pack`
|
||||||
|
|
||||||
#### Linux/Mac OS
|
#### Linux/Mac OS
|
||||||
|
|
||||||
@@ -39,9 +39,10 @@ Server builds are bundled with each released build (in Releases). If you'd rathe
|
|||||||
#### Android
|
#### Android
|
||||||
|
|
||||||
1. Install the Android SDK [here.](https://developer.android.com/studio#downloads) Make sure you're downloading the "Command line tools only", as Android Studio is not required.
|
1. Install the Android SDK [here.](https://developer.android.com/studio#downloads) Make sure you're downloading the "Command line tools only", as Android Studio is not required.
|
||||||
2. Create a file named `local.properties` inside the Mindustry directory, with its contents looking like this: `sdk.dir=<Path to Android SDK you just downloaded, without these bracket>`. For example, if you're on Windows and installed the tools to C:\\tools, your local.properties would contain `sdk.dir=C:\\tools` (*note the double backslashes are required instead of single ones!*).
|
2. Set the `ANDROID_HOME` environment variable to point to your unzipped Android SDK directory.
|
||||||
3. Run `gradlew android:assembleDebug` (or `./gradlew` if on linux/mac). This will create an unsigned APK in `android/build/outputs/apk`.
|
3. Run `gradlew android:assembleDebug` (or `./gradlew` if on linux/mac). This will create an unsigned APK in `android/build/outputs/apk`.
|
||||||
4. (Optional) To debug the application on a connected phone, do `gradlew android:installDebug android:run`. It is **highly recommended** to use IntelliJ for this instead.
|
|
||||||
|
To debug the application on a connected phone, run `gradlew android:installDebug android:run`.
|
||||||
|
|
||||||
##### Troubleshooting
|
##### Troubleshooting
|
||||||
|
|
||||||
@@ -69,3 +70,7 @@ Post feature requests and feedback [here](https://github.com/Anuken/Mindustry-Su
|
|||||||
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png"
|
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png"
|
||||||
alt="Get it on F-Droid"
|
alt="Get it on F-Droid"
|
||||||
height="80">](https://f-droid.org/packages/io.anuke.mindustry/)
|
height="80">](https://f-droid.org/packages/io.anuke.mindustry/)
|
||||||
|
|
||||||
|
[<img src="https://flathub.org/assets/badges/flathub-badge-en.svg"
|
||||||
|
alt="Download On Flathub"
|
||||||
|
height="60">](https://flathub.org/apps/details/com.github.Anuken.Mindustry)
|
||||||
|
|||||||
@@ -34,7 +34,8 @@ dependencies{
|
|||||||
natives "com.github.Anuken.Arc:natives-freetype-android:${getArcHash()}"
|
natives "com.github.Anuken.Arc:natives-freetype-android:${getArcHash()}"
|
||||||
natives "com.github.Anuken.Arc:natives-box2d-android:${getArcHash()}"
|
natives "com.github.Anuken.Arc:natives-box2d-android:${getArcHash()}"
|
||||||
|
|
||||||
if(localArc()) compileOnly fileTree(dir: '../../Arc/backends/backend-android/libs', include: ['*.jar'])
|
//android dependencies magically disappear during compilation, thanks gradle!
|
||||||
|
if(new File(projectDir.parent, '../Arc').exists()) compileOnly fileTree(dir: '../../Arc/backends/backend-android/libs', include: ['*.jar'])
|
||||||
}
|
}
|
||||||
|
|
||||||
task deploy(type: Copy){
|
task deploy(type: Copy){
|
||||||
@@ -98,7 +99,7 @@ android{
|
|||||||
keyAlias RELEASE_KEY_ALIAS
|
keyAlias RELEASE_KEY_ALIAS
|
||||||
keyPassword RELEASE_KEY_PASSWORD
|
keyPassword RELEASE_KEY_PASSWORD
|
||||||
}else{
|
}else{
|
||||||
println("No keystore info property found!")
|
println("No keystore property found. Releases will be unsigned.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import android.content.pm.*;
|
|||||||
import android.net.*;
|
import android.net.*;
|
||||||
import android.os.Build.*;
|
import android.os.Build.*;
|
||||||
import android.os.*;
|
import android.os.*;
|
||||||
import android.provider.Settings.*;
|
|
||||||
import android.telephony.*;
|
import android.telephony.*;
|
||||||
import arc.*;
|
import arc.*;
|
||||||
import arc.backend.android.*;
|
import arc.backend.android.*;
|
||||||
@@ -15,7 +14,7 @@ import arc.files.*;
|
|||||||
import arc.func.*;
|
import arc.func.*;
|
||||||
import arc.scene.ui.layout.*;
|
import arc.scene.ui.layout.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import arc.util.serialization.*;
|
import dalvik.system.*;
|
||||||
import mindustry.*;
|
import mindustry.*;
|
||||||
import mindustry.game.Saves.*;
|
import mindustry.game.Saves.*;
|
||||||
import mindustry.io.*;
|
import mindustry.io.*;
|
||||||
@@ -23,7 +22,6 @@ import mindustry.net.*;
|
|||||||
import mindustry.ui.dialogs.*;
|
import mindustry.ui.dialogs.*;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.lang.System;
|
|
||||||
import java.lang.Thread.*;
|
import java.lang.Thread.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@@ -73,12 +71,25 @@ public class AndroidLauncher extends AndroidApplication{
|
|||||||
public void shareFile(Fi file){
|
public void shareFile(Fi file){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<?> loadJar(Fi jar, String mainClass) throws Exception{
|
||||||
|
DexClassLoader loader = new DexClassLoader(jar.file().getPath(), getFilesDir().getPath(), null, getClassLoader());
|
||||||
|
return Class.forName(mainClass, true, loader);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void showFileChooser(boolean open, String extension, Cons<Fi> cons){
|
public void showFileChooser(boolean open, String extension, Cons<Fi> cons){
|
||||||
|
showFileChooser(open, cons, extension);
|
||||||
|
}
|
||||||
|
|
||||||
|
void showFileChooser(boolean open, Cons<Fi> cons, String... extensions){
|
||||||
|
String extension = extensions[0];
|
||||||
|
|
||||||
if(VERSION.SDK_INT >= VERSION_CODES.Q){
|
if(VERSION.SDK_INT >= VERSION_CODES.Q){
|
||||||
Intent intent = new Intent(open ? Intent.ACTION_OPEN_DOCUMENT : Intent.ACTION_CREATE_DOCUMENT);
|
Intent intent = new Intent(open ? Intent.ACTION_OPEN_DOCUMENT : Intent.ACTION_CREATE_DOCUMENT);
|
||||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||||
intent.setType(extension.equals("zip") && !open ? "application/zip" : "*/*");
|
intent.setType(extension.equals("zip") && !open && extensions.length == 1 ? "application/zip" : "*/*");
|
||||||
|
|
||||||
addResultListener(i -> startActivityForResult(intent, i), (code, in) -> {
|
addResultListener(i -> startActivityForResult(intent, i), (code, in) -> {
|
||||||
if(code == Activity.RESULT_OK && in != null && in.getData() != null){
|
if(code == Activity.RESULT_OK && in != null && in.getData() != null){
|
||||||
Uri uri = in.getData();
|
Uri uri = in.getData();
|
||||||
@@ -108,7 +119,7 @@ public class AndroidLauncher extends AndroidApplication{
|
|||||||
});
|
});
|
||||||
}else if(VERSION.SDK_INT >= VERSION_CODES.M && !(checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED &&
|
}else if(VERSION.SDK_INT >= VERSION_CODES.M && !(checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED &&
|
||||||
checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED)){
|
checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED)){
|
||||||
chooser = new FileChooser(open ? "@open" : "@save", file -> file.extension().equalsIgnoreCase(extension), open, file -> {
|
chooser = new FileChooser(open ? "@open" : "@save", file -> Structs.contains(extensions, file.extension().toLowerCase()), open, file -> {
|
||||||
if(!open){
|
if(!open){
|
||||||
cons.get(file.parent().child(file.nameWithoutExtension() + "." + extension));
|
cons.get(file.parent().child(file.nameWithoutExtension() + "." + extension));
|
||||||
}else{
|
}else{
|
||||||
@@ -125,10 +136,19 @@ public class AndroidLauncher extends AndroidApplication{
|
|||||||
}
|
}
|
||||||
requestPermissions(perms.toArray(new String[0]), PERMISSION_REQUEST_CODE);
|
requestPermissions(perms.toArray(new String[0]), PERMISSION_REQUEST_CODE);
|
||||||
}else{
|
}else{
|
||||||
super.showFileChooser(open, extension, cons);
|
if(open){
|
||||||
|
new FileChooser("@open", file -> Structs.contains(extensions, file.extension().toLowerCase()), true, cons).show();
|
||||||
|
}else{
|
||||||
|
super.showFileChooser(open, extension, cons);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void showMultiFileChooser(Cons<Fi> cons, String... extensions){
|
||||||
|
showFileChooser(true, cons, extensions);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void beginForceLandscape(){
|
public void beginForceLandscape(){
|
||||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
|
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
|
||||||
|
|||||||
@@ -41,6 +41,11 @@ public class AndroidRhinoContext{
|
|||||||
public Object getDynamicSecurityDomain(Object o){
|
public Object getDynamicSecurityDomain(Object o){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object callWithDomain(Object o, Context context, Callable callable, Scriptable scriptable, Scriptable scriptable1, Object[] objects){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
AndroidContextFactory factory;
|
AndroidContextFactory factory;
|
||||||
|
|||||||
@@ -38,6 +38,8 @@ public class EntityIO{
|
|||||||
this.serializer = serializer;
|
this.serializer = serializer;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
|
||||||
|
json.setIgnoreUnknownFields(true);
|
||||||
|
|
||||||
directory.mkdirs();
|
directory.mkdirs();
|
||||||
|
|
||||||
//load old revisions
|
//load old revisions
|
||||||
@@ -45,6 +47,8 @@ public class EntityIO{
|
|||||||
revisions.add(json.fromJson(Revision.class, fi));
|
revisions.add(json.fromJson(Revision.class, fi));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
revisions.sort(r -> r.version);
|
||||||
|
|
||||||
//next revision to be used
|
//next revision to be used
|
||||||
int nextRevision = revisions.isEmpty() ? 0 : revisions.max(r -> r.version).version + 1;
|
int nextRevision = revisions.isEmpty() ? 0 : revisions.max(r -> r.version).version + 1;
|
||||||
|
|
||||||
@@ -61,11 +65,13 @@ public class EntityIO{
|
|||||||
//keep track of fields present in the entity
|
//keep track of fields present in the entity
|
||||||
presentFields.addAll(fields.map(f -> f.name));
|
presentFields.addAll(fields.map(f -> f.name));
|
||||||
|
|
||||||
|
Revision previous = revisions.isEmpty() ? null : revisions.peek();
|
||||||
|
|
||||||
//add new revision if it doesn't match or there are no revisions
|
//add new revision if it doesn't match or there are no revisions
|
||||||
if(revisions.isEmpty() || !revisions.peek().equal(fields)){
|
if(revisions.isEmpty() || !revisions.peek().equal(fields)){
|
||||||
revisions.add(new Revision(nextRevision,
|
revisions.add(new Revision(nextRevision,
|
||||||
fields.map(f -> new RevisionField(f.name, f.type.toString(),
|
fields.map(f -> new RevisionField(f.name, f.type.toString()))));
|
||||||
f.type.isPrimitive() ? BaseProcessor.typeSize(f.type.toString()) : -1))));
|
Log.warn("Adding new revision @ for @.\nPre = @\nNew = @\n", nextRevision, name, previous == null ? null : previous.fields.toString(", ", f -> f.name + ":" + f.type), fields.toString(", ", f -> f.name + ":" + f.type.toString()));
|
||||||
//write revision
|
//write revision
|
||||||
directory.child(nextRevision + ".json").writeString(json.toJson(revisions.peek()));
|
directory.child(nextRevision + ".json").writeString(json.toJson(revisions.peek()));
|
||||||
}
|
}
|
||||||
@@ -147,6 +153,12 @@ public class EntityIO{
|
|||||||
|
|
||||||
io(field.type, "");
|
io(field.type, "");
|
||||||
|
|
||||||
|
//just assign the two values so jumping does not occur on de-possession
|
||||||
|
if(sf){
|
||||||
|
st(field.name + lastSuf + " = this." + field.name);
|
||||||
|
st(field.name + targetSuf + " = this." + field.name);
|
||||||
|
}
|
||||||
|
|
||||||
econt();
|
econt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -316,8 +328,7 @@ public class EntityIO{
|
|||||||
for(int i = 0; i < fields.size; i++){
|
for(int i = 0; i < fields.size; i++){
|
||||||
RevisionField field = fields.get(i);
|
RevisionField field = fields.get(i);
|
||||||
FieldSpec spec = specs.get(i);
|
FieldSpec spec = specs.get(i);
|
||||||
//TODO when making fields, their primitive size may be overwritten by an annotation; check for that
|
if(!field.type.replace("mindustry.gen.", "").equals(spec.type.toString().replace("mindustry.gen.", ""))){
|
||||||
if(!(field.type.equals(spec.type.toString()) && (!spec.type.isPrimitive() || BaseProcessor.typeSize(spec.type.toString()) == field.size))){
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -327,11 +338,9 @@ public class EntityIO{
|
|||||||
|
|
||||||
public static class RevisionField{
|
public static class RevisionField{
|
||||||
String name, type;
|
String name, type;
|
||||||
int size; //in bytes
|
|
||||||
|
|
||||||
RevisionField(String name, String type, int size){
|
RevisionField(String name, String type){
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.size = size;
|
|
||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package mindustry.annotations.entity;
|
package mindustry.annotations.entity;
|
||||||
|
|
||||||
import arc.*;
|
|
||||||
import arc.files.*;
|
import arc.files.*;
|
||||||
import arc.func.*;
|
import arc.func.*;
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
@@ -77,7 +76,11 @@ public class EntityProcess extends BaseProcessor{
|
|||||||
for(Smethod elem : component.methods()){
|
for(Smethod elem : component.methods()){
|
||||||
if(elem.is(Modifier.ABSTRACT) || elem.is(Modifier.NATIVE)) continue;
|
if(elem.is(Modifier.ABSTRACT) || elem.is(Modifier.NATIVE)) continue;
|
||||||
//get all statements in the method, store them
|
//get all statements in the method, store them
|
||||||
methodBlocks.put(elem.descString(), elem.tree().getBody().toString());
|
methodBlocks.put(elem.descString(), elem.tree().getBody().toString()
|
||||||
|
//replace all self() invocations with this
|
||||||
|
.replaceAll("this\\.<(.*)>self\\(\\)", "this")
|
||||||
|
.replaceAll("self\\(\\)", "this")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -468,6 +471,17 @@ public class EntityProcess extends BaseProcessor{
|
|||||||
mbuilder.addStatement("$L = $L", field.name(), field.name() + EntityIO.targetSuf);
|
mbuilder.addStatement("$L = $L", field.name(), field.name() + EntityIO.targetSuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//SPECIAL CASE: method to snap to current position so interpolation doesn't go wild
|
||||||
|
if(first.name().equals("snapInterpolation")){
|
||||||
|
mbuilder.addStatement("updateSpacing = 16");
|
||||||
|
mbuilder.addStatement("lastUpdated = $T.millis()", Time.class);
|
||||||
|
for(Svar field : syncedFields){
|
||||||
|
//reset last+current state to target position
|
||||||
|
mbuilder.addStatement("$L = $L", field.name() + EntityIO.lastSuf, field.name());
|
||||||
|
mbuilder.addStatement("$L = $L", field.name() + EntityIO.targetSuf, field.name());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(Smethod elem : entry.value){
|
for(Smethod elem : entry.value){
|
||||||
@@ -505,7 +519,7 @@ public class EntityProcess extends BaseProcessor{
|
|||||||
//add free code to remove methods - always at the end
|
//add free code to remove methods - always at the end
|
||||||
//this only gets called next frame.
|
//this only gets called next frame.
|
||||||
if(first.name().equals("remove") && ann.pooled()){
|
if(first.name().equals("remove") && ann.pooled()){
|
||||||
mbuilder.addStatement("$T.app.post(() -> $T.free(this))", Core.class, Pools.class);
|
mbuilder.addStatement("mindustry.gen.Groups.queueFree(($T)this)", Poolable.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
builder.addMethod(mbuilder.build());
|
builder.addMethod(mbuilder.build());
|
||||||
@@ -572,6 +586,17 @@ public class EntityProcess extends BaseProcessor{
|
|||||||
//write clear
|
//write clear
|
||||||
groupsBuilder.addMethod(groupClear.build());
|
groupsBuilder.addMethod(groupClear.build());
|
||||||
|
|
||||||
|
//add method for pool storage
|
||||||
|
groupsBuilder.addField(FieldSpec.builder(ParameterizedTypeName.get(Seq.class, Poolable.class), "freeQueue", Modifier.PRIVATE, Modifier.STATIC).initializer("new Seq<>()").build());
|
||||||
|
|
||||||
|
//method for freeing things
|
||||||
|
MethodSpec.Builder groupFreeQueue = MethodSpec.methodBuilder("queueFree")
|
||||||
|
.addModifiers(Modifier.PUBLIC, Modifier.STATIC)
|
||||||
|
.addParameter(Poolable.class, "obj")
|
||||||
|
.addStatement("freeQueue.add(obj)");
|
||||||
|
|
||||||
|
groupsBuilder.addMethod(groupFreeQueue.build());
|
||||||
|
|
||||||
//add method for resizing all necessary groups
|
//add method for resizing all necessary groups
|
||||||
MethodSpec.Builder groupResize = MethodSpec.methodBuilder("resize")
|
MethodSpec.Builder groupResize = MethodSpec.methodBuilder("resize")
|
||||||
.addParameter(TypeName.FLOAT, "x").addParameter(TypeName.FLOAT, "y").addParameter(TypeName.FLOAT, "w").addParameter(TypeName.FLOAT, "h")
|
.addParameter(TypeName.FLOAT, "x").addParameter(TypeName.FLOAT, "y").addParameter(TypeName.FLOAT, "w").addParameter(TypeName.FLOAT, "h")
|
||||||
@@ -580,6 +605,11 @@ public class EntityProcess extends BaseProcessor{
|
|||||||
MethodSpec.Builder groupUpdate = MethodSpec.methodBuilder("update")
|
MethodSpec.Builder groupUpdate = MethodSpec.methodBuilder("update")
|
||||||
.addModifiers(Modifier.PUBLIC, Modifier.STATIC);
|
.addModifiers(Modifier.PUBLIC, Modifier.STATIC);
|
||||||
|
|
||||||
|
//free everything pooled at the start of each updaet
|
||||||
|
groupUpdate
|
||||||
|
.addStatement("for($T p : freeQueue) $T.free(p)", Poolable.class, Pools.class)
|
||||||
|
.addStatement("freeQueue.clear()");
|
||||||
|
|
||||||
//method resize
|
//method resize
|
||||||
for(GroupDefinition group : groupDefs){
|
for(GroupDefinition group : groupDefs){
|
||||||
if(group.spatial){
|
if(group.spatial){
|
||||||
@@ -631,10 +661,10 @@ public class EntityProcess extends BaseProcessor{
|
|||||||
|
|
||||||
//build mapping class for sync IDs
|
//build mapping class for sync IDs
|
||||||
TypeSpec.Builder idBuilder = TypeSpec.classBuilder("EntityMapping").addModifiers(Modifier.PUBLIC)
|
TypeSpec.Builder idBuilder = TypeSpec.classBuilder("EntityMapping").addModifiers(Modifier.PUBLIC)
|
||||||
.addField(FieldSpec.builder(TypeName.get(Prov[].class), "idMap", Modifier.PRIVATE, Modifier.STATIC).initializer("new Prov[256]").build())
|
.addField(FieldSpec.builder(TypeName.get(Prov[].class), "idMap", Modifier.PUBLIC, Modifier.STATIC).initializer("new Prov[256]").build())
|
||||||
.addField(FieldSpec.builder(ParameterizedTypeName.get(ClassName.get(ObjectMap.class),
|
.addField(FieldSpec.builder(ParameterizedTypeName.get(ClassName.get(ObjectMap.class),
|
||||||
tname(String.class), tname(Prov.class)),
|
tname(String.class), tname(Prov.class)),
|
||||||
"nameMap", Modifier.PRIVATE, Modifier.STATIC).initializer("new ObjectMap<>()").build())
|
"nameMap", Modifier.PUBLIC, Modifier.STATIC).initializer("new ObjectMap<>()").build())
|
||||||
.addMethod(MethodSpec.methodBuilder("map").addModifiers(Modifier.PUBLIC, Modifier.STATIC)
|
.addMethod(MethodSpec.methodBuilder("map").addModifiers(Modifier.PUBLIC, Modifier.STATIC)
|
||||||
.returns(TypeName.get(Prov.class)).addParameter(int.class, "id").addStatement("return idMap[id]").build())
|
.returns(TypeName.get(Prov.class)).addParameter(int.class, "id").addStatement("return idMap[id]").build())
|
||||||
.addMethod(MethodSpec.methodBuilder("map").addModifiers(Modifier.PUBLIC, Modifier.STATIC)
|
.addMethod(MethodSpec.methodBuilder("map").addModifiers(Modifier.PUBLIC, Modifier.STATIC)
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ package mindustry.annotations.impl;
|
|||||||
import arc.files.*;
|
import arc.files.*;
|
||||||
import arc.scene.style.*;
|
import arc.scene.style.*;
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
|
import arc.util.*;
|
||||||
|
import arc.util.io.*;
|
||||||
import arc.util.serialization.*;
|
import arc.util.serialization.*;
|
||||||
import com.squareup.javapoet.*;
|
import com.squareup.javapoet.*;
|
||||||
import mindustry.annotations.Annotations.*;
|
import mindustry.annotations.Annotations.*;
|
||||||
@@ -33,6 +35,17 @@ public class AssetsProcess extends BaseProcessor{
|
|||||||
String resources = rootDirectory + "/core/assets-raw/sprites/ui";
|
String resources = rootDirectory + "/core/assets-raw/sprites/ui";
|
||||||
Jval icons = Jval.read(Fi.get(rootDirectory + "/core/assets-raw/fontgen/config.json").readString());
|
Jval icons = Jval.read(Fi.get(rootDirectory + "/core/assets-raw/fontgen/config.json").readString());
|
||||||
|
|
||||||
|
ObjectMap<String, String> texIcons = new OrderedMap<>();
|
||||||
|
PropertiesUtils.load(texIcons, Fi.get(rootDirectory + "/core/assets/icons/icons.properties").reader());
|
||||||
|
|
||||||
|
texIcons.each((key, val) -> {
|
||||||
|
String[] split = val.split("\\|");
|
||||||
|
String name = Strings.kebabToCamel(split[1]).replace("Medium", "").replace("Icon", "");
|
||||||
|
if(SourceVersion.isKeyword(name) || name.equals("char")) name = name + "i";
|
||||||
|
|
||||||
|
ichtype.addField(FieldSpec.builder(char.class, name, Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL).initializer("(char)" + key).build());
|
||||||
|
});
|
||||||
|
|
||||||
ictype.addField(FieldSpec.builder(ParameterizedTypeName.get(ObjectMap.class, String.class, TextureRegionDrawable.class),
|
ictype.addField(FieldSpec.builder(ParameterizedTypeName.get(ObjectMap.class, String.class, TextureRegionDrawable.class),
|
||||||
"icons", Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL).initializer("new ObjectMap<>()").build());
|
"icons", Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL).initializer("new ObjectMap<>()").build());
|
||||||
|
|
||||||
|
|||||||
@@ -68,9 +68,9 @@ public class CallSuperProcess extends AbstractProcessor{
|
|||||||
}
|
}
|
||||||
|
|
||||||
static class CodeAnalyzerTreeScanner extends TreePathScanner<Object, Trees>{
|
static class CodeAnalyzerTreeScanner extends TreePathScanner<Object, Trees>{
|
||||||
private String methodName;
|
String methodName;
|
||||||
private MethodTree method;
|
MethodTree method;
|
||||||
private boolean callSuperUsed;
|
boolean callSuperUsed;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object visitClass(ClassTree classTree, Trees trees){
|
public Object visitClass(ClassTree classTree, Trees trees){
|
||||||
@@ -83,6 +83,9 @@ public class CallSuperProcess extends AbstractProcessor{
|
|||||||
|
|
||||||
if(extendTree instanceof JCIdent){
|
if(extendTree instanceof JCIdent){
|
||||||
JCIdent tree = (JCIdent)extendTree;
|
JCIdent tree = (JCIdent)extendTree;
|
||||||
|
|
||||||
|
if(tree == null || tree.sym == null) return super.visitClass(classTree, trees);
|
||||||
|
|
||||||
com.sun.tools.javac.code.Scope members = tree.sym.members();
|
com.sun.tools.javac.code.Scope members = tree.sym.members();
|
||||||
|
|
||||||
if(checkScope(members))
|
if(checkScope(members))
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public class LogicStatementProcessor extends BaseProcessor{
|
|||||||
int index = 0;
|
int index = 0;
|
||||||
|
|
||||||
for(Svar field : fields){
|
for(Svar field : fields){
|
||||||
if(field.is(Modifier.TRANSIENT)) continue;
|
if(field.isAny(Modifier.TRANSIENT, Modifier.STATIC)) continue;
|
||||||
|
|
||||||
writer.addStatement("out.append(\" \")");
|
writer.addStatement("out.append(\" \")");
|
||||||
writer.addStatement("out.append((($T)obj).$L$L)", c.mirror(), field.name(),
|
writer.addStatement("out.append((($T)obj).$L$L)", c.mirror(), field.name(),
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import java.util.*;
|
|||||||
})
|
})
|
||||||
public class RemoteProcess extends BaseProcessor{
|
public class RemoteProcess extends BaseProcessor{
|
||||||
/** Maximum size of each event packet. */
|
/** Maximum size of each event packet. */
|
||||||
public static final int maxPacketSize = 4096;
|
public static final int maxPacketSize = 8192;
|
||||||
/** Warning on top of each autogenerated file. */
|
/** Warning on top of each autogenerated file. */
|
||||||
public static final String autogenWarning = "Autogenerated file. Do not modify!\n";
|
public static final String autogenWarning = "Autogenerated file. Do not modify!\n";
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
alpha=0
|
alpha=0
|
||||||
atrax=1
|
atrax=1
|
||||||
block=2
|
block=2
|
||||||
|
corvus=24
|
||||||
flare=3
|
flare=3
|
||||||
mace=4
|
mace=4
|
||||||
mega=5
|
mega=5
|
||||||
@@ -16,9 +17,13 @@ mindustry.entities.comp.PlayerComp=12
|
|||||||
mindustry.entities.comp.PuddleComp=13
|
mindustry.entities.comp.PuddleComp=13
|
||||||
mindustry.type.Weather.WeatherStateComp=14
|
mindustry.type.Weather.WeatherStateComp=14
|
||||||
mindustry.world.blocks.campaign.LaunchPad.LaunchPayloadComp=15
|
mindustry.world.blocks.campaign.LaunchPad.LaunchPayloadComp=15
|
||||||
|
mindustry.world.blocks.defense.ForceProjector.ForceDrawComp=22
|
||||||
mono=16
|
mono=16
|
||||||
nova=17
|
nova=17
|
||||||
|
oct=26
|
||||||
poly=18
|
poly=18
|
||||||
pulsar=19
|
pulsar=19
|
||||||
|
quad=23
|
||||||
risso=20
|
risso=20
|
||||||
spiroct=21
|
spiroct=21
|
||||||
|
vela=25
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:health,type:float},{name:isShooting,type:boolean},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:x,type:float},{name:y,type:float}]}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>,size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>,size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>,size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
@@ -1 +1 @@
|
|||||||
{fields:[{name:collided,type:arc.struct.IntSeq,size:-1},{name:damage,type:float,size:4},{name:data,type:java.lang.Object,size:-1},{name:lifetime,type:float,size:4},{name:owner,type:mindustry.gen.Entityc,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:time,type:float,size:4},{name:type,type:mindustry.entities.bullet.BulletType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
{fields:[{name:collided,type:arc.struct.IntSeq,size:-1},{name:damage,type:float,size:4},{name:data,type:java.lang.Object,size:-1},{name:fdata,type:float,size:4},{name:lifetime,type:float,size:4},{name:owner,type:mindustry.gen.Entityc,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:time,type:float,size:4},{name:type,type:mindustry.entities.bullet.BulletType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:1,fields:[{name:collided,type:arc.struct.IntSeq,size:-1},{name:damage,type:float,size:4},{name:data,type:java.lang.Object,size:-1},{name:lifetime,type:float,size:4},{name:owner,type:Entityc,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:time,type:float,size:4},{name:type,type:mindustry.entities.bullet.BulletType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:2,fields:[{name:collided,type:arc.struct.IntSeq,size:-1},{name:damage,type:float,size:4},{name:data,type:java.lang.Object,size:-1},{name:lifetime,type:float,size:4},{name:owner,type:mindustry.gen.Entityc,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:time,type:float,size:4},{name:type,type:mindustry.entities.bullet.BulletType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:3,fields:[{name:collided,type:arc.struct.IntSeq,size:-1},{name:damage,type:float,size:4},{name:data,type:java.lang.Object,size:-1},{name:lifetime,type:float,size:4},{name:owner,type:Entityc,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:time,type:float,size:4},{name:type,type:mindustry.entities.bullet.BulletType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:4,fields:[{name:collided,type:arc.struct.IntSeq,size:-1},{name:damage,type:float,size:4},{name:data,type:java.lang.Object,size:-1},{name:lifetime,type:float,size:4},{name:owner,type:Entityc,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:time,type:float,size:4},{name:type,type:mindustry.entities.bullet.BulletType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:5,fields:[{name:collided,type:arc.struct.IntSeq,size:-1},{name:damage,type:float,size:4},{name:data,type:java.lang.Object,size:-1},{name:lifetime,type:float,size:4},{name:owner,type:Entityc,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:time,type:float,size:4},{name:type,type:mindustry.entities.bullet.BulletType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
1
annotations/src/main/resources/revisions/Fire/1.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:1,fields:[{name:lifetime,type:float,size:4},{name:tile,type:mindustry.world.Tile,size:-1},{name:time,type:float,size:4},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{fields:[{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
1
annotations/src/main/resources/revisions/LegsUnit/1.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
1
annotations/src/main/resources/revisions/MechUnit/1.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
12
build.gradle
@@ -32,11 +32,11 @@ allprojects{
|
|||||||
|
|
||||||
ext{
|
ext{
|
||||||
versionNumber = '6'
|
versionNumber = '6'
|
||||||
if(!project.hasProperty("versionModifier")) versionModifier = 'pre-alpha'
|
if(!project.hasProperty("versionModifier")) versionModifier = 'alpha'
|
||||||
if(!project.hasProperty("versionType")) versionType = 'official'
|
if(!project.hasProperty("versionType")) versionType = 'official'
|
||||||
appName = 'Mindustry'
|
appName = 'Mindustry'
|
||||||
steamworksVersion = '891ed912791e01fe9ee6237a6497e5212b85c256'
|
steamworksVersion = '891ed912791e01fe9ee6237a6497e5212b85c256'
|
||||||
rhinoVersion = 'eeb327d141146663ff3924bd20d2a5da8a6439cc'
|
rhinoVersion = '8437435dab9993769d72739608580d40c5343285'
|
||||||
|
|
||||||
loadVersionProps = {
|
loadVersionProps = {
|
||||||
return new Properties().with{p -> p.load(file('../core/assets/version.properties').newReader()); return p }
|
return new Properties().with{p -> p.load(file('../core/assets/version.properties').newReader()); return p }
|
||||||
@@ -200,7 +200,6 @@ project(":desktop"){
|
|||||||
|
|
||||||
dependencies{
|
dependencies{
|
||||||
implementation project(":core")
|
implementation project(":core")
|
||||||
implementation arcModule("natives:natives-box2d-desktop")
|
|
||||||
implementation arcModule("natives:natives-desktop")
|
implementation arcModule("natives:natives-desktop")
|
||||||
implementation arcModule("natives:natives-freetype-desktop")
|
implementation arcModule("natives:natives-freetype-desktop")
|
||||||
implementation 'com.github.MinnDevelopment:java-discord-rpc:v2.0.1'
|
implementation 'com.github.MinnDevelopment:java-discord-rpc:v2.0.1'
|
||||||
@@ -239,7 +238,6 @@ project(":ios"){
|
|||||||
|
|
||||||
implementation arcModule("natives:natives-ios")
|
implementation arcModule("natives:natives-ios")
|
||||||
implementation arcModule("natives:natives-freetype-ios")
|
implementation arcModule("natives:natives-freetype-ios")
|
||||||
implementation arcModule("natives:natives-box2d-ios")
|
|
||||||
implementation arcModule("backends:backend-robovm")
|
implementation arcModule("backends:backend-robovm")
|
||||||
|
|
||||||
compileOnly project(":annotations")
|
compileOnly project(":annotations")
|
||||||
@@ -261,7 +259,6 @@ project(":core"){
|
|||||||
doLast{
|
doLast{
|
||||||
def props = loadVersionProps()
|
def props = loadVersionProps()
|
||||||
def androidVersion = props['androidBuildCode'].toInteger() - 2
|
def androidVersion = props['androidBuildCode'].toInteger() - 2
|
||||||
def buildVersion = props["build"]
|
|
||||||
def loglines = file("../changelog").text.split("\n")
|
def loglines = file("../changelog").text.split("\n")
|
||||||
def maxLength = 460
|
def maxLength = 460
|
||||||
|
|
||||||
@@ -273,7 +270,6 @@ project(":core"){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
def changelogs = file("../fastlane/metadata/android/en-US/changelogs/")
|
def changelogs = file("../fastlane/metadata/android/en-US/changelogs/")
|
||||||
new File(changelogs, buildVersion + ".txt").text = (result)
|
|
||||||
new File(changelogs, androidVersion + ".txt").text = (result)
|
new File(changelogs, androidVersion + ".txt").text = (result)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -284,7 +280,6 @@ project(":core"){
|
|||||||
api "org.lz4:lz4-java:1.4.1"
|
api "org.lz4:lz4-java:1.4.1"
|
||||||
api arcModule("arc-core")
|
api arcModule("arc-core")
|
||||||
api arcModule("extensions:freetype")
|
api arcModule("extensions:freetype")
|
||||||
api arcModule("extensions:box2d")
|
|
||||||
api arcModule("extensions:g3d")
|
api arcModule("extensions:g3d")
|
||||||
api arcModule("extensions:fx")
|
api arcModule("extensions:fx")
|
||||||
api arcModule("extensions:arcnet")
|
api arcModule("extensions:arcnet")
|
||||||
@@ -301,7 +296,6 @@ project(":server"){
|
|||||||
|
|
||||||
dependencies{
|
dependencies{
|
||||||
implementation project(":core")
|
implementation project(":core")
|
||||||
implementation arcModule("natives:natives-box2d-desktop")
|
|
||||||
implementation arcModule("backends:backend-headless")
|
implementation arcModule("backends:backend-headless")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -314,7 +308,6 @@ project(":tests"){
|
|||||||
testImplementation "org.junit.jupiter:junit-jupiter-params:5.3.1"
|
testImplementation "org.junit.jupiter:junit-jupiter-params:5.3.1"
|
||||||
testImplementation "org.junit.jupiter:junit-jupiter-api:5.3.1"
|
testImplementation "org.junit.jupiter:junit-jupiter-api:5.3.1"
|
||||||
testImplementation arcModule("backends:backend-headless")
|
testImplementation arcModule("backends:backend-headless")
|
||||||
testImplementation arcModule("natives:natives-box2d-desktop")
|
|
||||||
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.3.1"
|
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.3.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -336,7 +329,6 @@ project(":tools"){
|
|||||||
|
|
||||||
implementation arcModule("natives:natives-desktop")
|
implementation arcModule("natives:natives-desktop")
|
||||||
implementation arcModule("natives:natives-freetype-desktop")
|
implementation arcModule("natives:natives-freetype-desktop")
|
||||||
implementation arcModule("natives:natives-box2d-desktop")
|
|
||||||
implementation arcModule("backends:backend-headless")
|
implementation arcModule("backends:backend-headless")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 230 B After Width: | Height: | Size: 277 B |
|
Before Width: | Height: | Size: 229 B After Width: | Height: | Size: 277 B |
|
Before Width: | Height: | Size: 231 B After Width: | Height: | Size: 283 B |
|
Before Width: | Height: | Size: 226 B After Width: | Height: | Size: 278 B |
|
Before Width: | Height: | Size: 298 B After Width: | Height: | Size: 491 B |
|
Before Width: | Height: | Size: 309 B After Width: | Height: | Size: 499 B |
|
Before Width: | Height: | Size: 321 B After Width: | Height: | Size: 522 B |
|
Before Width: | Height: | Size: 304 B After Width: | Height: | Size: 515 B |
|
Before Width: | Height: | Size: 268 B After Width: | Height: | Size: 300 B |
|
Before Width: | Height: | Size: 252 B After Width: | Height: | Size: 292 B |
|
Before Width: | Height: | Size: 250 B After Width: | Height: | Size: 294 B |
|
Before Width: | Height: | Size: 261 B After Width: | Height: | Size: 299 B |
|
Before Width: | Height: | Size: 247 B After Width: | Height: | Size: 296 B |
|
Before Width: | Height: | Size: 243 B After Width: | Height: | Size: 290 B |
|
Before Width: | Height: | Size: 234 B After Width: | Height: | Size: 289 B |
|
Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 292 B |
|
Before Width: | Height: | Size: 228 B After Width: | Height: | Size: 375 B |
|
Before Width: | Height: | Size: 247 B After Width: | Height: | Size: 408 B |
|
Before Width: | Height: | Size: 257 B After Width: | Height: | Size: 419 B |
|
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 409 B |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 640 B |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 636 B |
|
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 410 B |
|
Before Width: | Height: | Size: 265 B After Width: | Height: | Size: 441 B |
|
Before Width: | Height: | Size: 280 B After Width: | Height: | Size: 454 B |
|
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 448 B |
|
Before Width: | Height: | Size: 191 B After Width: | Height: | Size: 191 B |
|
Before Width: | Height: | Size: 186 B After Width: | Height: | Size: 186 B |
|
Before Width: | Height: | Size: 214 B After Width: | Height: | Size: 214 B |
|
Before Width: | Height: | Size: 298 B |
BIN
core/assets-raw/sprites/blocks/environment/dacite-wall-large.png
Normal file
|
After Width: | Height: | Size: 742 B |
BIN
core/assets-raw/sprites/blocks/environment/dacite-wall1.png
Normal file
|
After Width: | Height: | Size: 349 B |
BIN
core/assets-raw/sprites/blocks/environment/dacite-wall2.png
Normal file
|
After Width: | Height: | Size: 354 B |
BIN
core/assets-raw/sprites/blocks/environment/dacite1.png
Normal file
|
After Width: | Height: | Size: 283 B |
BIN
core/assets-raw/sprites/blocks/environment/dacite2.png
Normal file
|
After Width: | Height: | Size: 236 B |
BIN
core/assets-raw/sprites/blocks/environment/dacite3.png
Normal file
|
After Width: | Height: | Size: 265 B |
BIN
core/assets-raw/sprites/blocks/environment/dirt-wall-large.png
Normal file
|
After Width: | Height: | Size: 696 B |
BIN
core/assets-raw/sprites/blocks/environment/dirt-wall1.png
Normal file
|
After Width: | Height: | Size: 343 B |
BIN
core/assets-raw/sprites/blocks/environment/dirt-wall2.png
Normal file
|
After Width: | Height: | Size: 339 B |
BIN
core/assets-raw/sprites/blocks/environment/dirt1.png
Normal file
|
After Width: | Height: | Size: 143 B |
BIN
core/assets-raw/sprites/blocks/environment/dirt2.png
Normal file
|
After Width: | Height: | Size: 155 B |
BIN
core/assets-raw/sprites/blocks/environment/dirt3.png
Normal file
|
After Width: | Height: | Size: 585 B |
|
Before Width: | Height: | Size: 631 B After Width: | Height: | Size: 631 B |
|
Before Width: | Height: | Size: 256 B After Width: | Height: | Size: 256 B |
|
Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 239 B |
|
Before Width: | Height: | Size: 224 B |
|
Before Width: | Height: | Size: 228 B |
|
Before Width: | Height: | Size: 225 B |
|
Before Width: | Height: | Size: 526 B After Width: | Height: | Size: 526 B |
|
Before Width: | Height: | Size: 255 B After Width: | Height: | Size: 255 B |
|
Before Width: | Height: | Size: 268 B After Width: | Height: | Size: 268 B |
|
Before Width: | Height: | Size: 150 B After Width: | Height: | Size: 235 B |
BIN
core/assets-raw/sprites/blocks/environment/mud1.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
core/assets-raw/sprites/blocks/environment/mud2.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
core/assets-raw/sprites/blocks/environment/mud3.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 499 B After Width: | Height: | Size: 499 B |
|
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 260 B |
|
Before Width: | Height: | Size: 261 B After Width: | Height: | Size: 261 B |