Merge branch 'master' of https://github.com/Anuken/Mindustry
3
.gitignore
vendored
@@ -13,8 +13,9 @@ logs/
|
|||||||
/desktop/gifexport/
|
/desktop/gifexport/
|
||||||
/core/lib/
|
/core/lib/
|
||||||
/core/assets-raw/sprites/generated/
|
/core/assets-raw/sprites/generated/
|
||||||
|
/core/assets-raw/sprites_out/
|
||||||
/annotations/build/
|
/annotations/build/
|
||||||
/kryonet/build/
|
/net/build/
|
||||||
/tools/build/
|
/tools/build/
|
||||||
/tests/build/
|
/tests/build/
|
||||||
/server/build/
|
/server/build/
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ A pixelated sandbox tower defense game made using [LibGDX](https://libgdx.badlog
|
|||||||
|
|
||||||
_[Trello Board](https://trello.com/b/aE2tcUwF/mindustry-40-plans)_
|
_[Trello Board](https://trello.com/b/aE2tcUwF/mindustry-40-plans)_
|
||||||
_[Wiki](http://mindustry.wikia.com/wiki/Mindustry_Wiki)_
|
_[Wiki](http://mindustry.wikia.com/wiki/Mindustry_Wiki)_
|
||||||
_[Discord](https://discord.gg/r8BkXNd)_
|
|
||||||
|
|
||||||
### Building
|
### Building
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
android:appCategory="game"
|
android:appCategory="game"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:theme="@style/GdxTheme" android:fullBackupContent="@xml/backup_rules">
|
android:theme="@style/GdxTheme" android:fullBackupContent="@xml/backup_rules">
|
||||||
|
<meta-data android:name="android.max_aspect" android:value="2.1" />
|
||||||
<activity
|
<activity
|
||||||
android:name="io.anuke.mindustry.AndroidLauncher"
|
android:name="io.anuke.mindustry.AndroidLauncher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
|
|||||||
@@ -26,24 +26,22 @@ repositories {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation project(":core")
|
implementation project(":core")
|
||||||
implementation project(":kryonet")
|
implementation project(":net")
|
||||||
implementation 'com.android.support:support-v4:28.0.0'
|
implementation 'com.android.support:support-v4:28.0.0'
|
||||||
implementation 'org.sufficientlysecure:donations:2.5'
|
implementation 'org.sufficientlysecure:donations:2.5'
|
||||||
implementation 'com.google.android.gms:play-services-auth:16.0.1'
|
implementation 'com.google.android.gms:play-services-auth:16.0.1'
|
||||||
|
|
||||||
implementation "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
|
implementation arcModule("backends:backend-android")
|
||||||
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
|
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
|
||||||
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
|
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
|
||||||
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a"
|
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a"
|
||||||
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
|
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
|
||||||
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64"
|
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64"
|
||||||
implementation "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
|
|
||||||
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi"
|
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi"
|
||||||
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi-v7a"
|
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi-v7a"
|
||||||
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-arm64-v8a"
|
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-arm64-v8a"
|
||||||
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86"
|
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86"
|
||||||
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86_64"
|
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86_64"
|
||||||
implementation "com.badlogicgames.gdx:gdx-controllers-android:$gdxVersion"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
task deploy(type: Copy){
|
task deploy(type: Copy){
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<string-array name="donation_google_catalog_values">
|
<string-array name="donation_google_catalog_values">
|
||||||
<item>1 Доллар</item>
|
<item>1 Доллар</item>
|
||||||
<item>2 Доллара</item>
|
<item>2 Доллара</item>
|
||||||
<item>5 Доллара</item>
|
<item>5 Долларов</item>
|
||||||
<item>10 Долларов</item>
|
<item>10 Долларов</item>
|
||||||
<item>15 Долларов</item>
|
<item>15 Долларов</item>
|
||||||
<item>25 Долларов</item>
|
<item>25 Долларов</item>
|
||||||
|
|||||||
15
android/res/values-uk/strings.xml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<string name="app_name">Mindustry</string>
|
||||||
|
<string-array name="donation_google_catalog_values">
|
||||||
|
<item>1 Доллар</item>
|
||||||
|
<item>2 Доллара</item>
|
||||||
|
<item>5 Долларів</item>
|
||||||
|
<item>10 Долларів</item>
|
||||||
|
<item>15 Долларів</item>
|
||||||
|
<item>25 Долларів</item>
|
||||||
|
<item>50 Долларів</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
</resources>
|
||||||
@@ -11,25 +11,25 @@ import android.os.Bundle;
|
|||||||
import android.provider.Settings.Secure;
|
import android.provider.Settings.Secure;
|
||||||
import android.telephony.TelephonyManager;
|
import android.telephony.TelephonyManager;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import com.badlogic.gdx.Gdx;
|
|
||||||
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
|
|
||||||
import com.badlogic.gdx.files.FileHandle;
|
|
||||||
import com.badlogic.gdx.utils.Base64Coder;
|
|
||||||
import com.google.android.gms.common.GoogleApiAvailability;
|
import com.google.android.gms.common.GoogleApiAvailability;
|
||||||
import com.google.android.gms.common.GooglePlayServicesNotAvailableException;
|
import com.google.android.gms.common.GooglePlayServicesNotAvailableException;
|
||||||
import com.google.android.gms.common.GooglePlayServicesRepairableException;
|
import com.google.android.gms.common.GooglePlayServicesRepairableException;
|
||||||
import com.google.android.gms.security.ProviderInstaller;
|
import com.google.android.gms.security.ProviderInstaller;
|
||||||
import io.anuke.kryonet.KryoClient;
|
import io.anuke.arc.Core;
|
||||||
import io.anuke.kryonet.KryoServer;
|
import io.anuke.arc.backends.android.surfaceview.AndroidApplication;
|
||||||
|
import io.anuke.arc.backends.android.surfaceview.AndroidApplicationConfiguration;
|
||||||
|
import io.anuke.arc.files.FileHandle;
|
||||||
|
import io.anuke.arc.function.Consumer;
|
||||||
|
import io.anuke.arc.scene.ui.layout.Unit;
|
||||||
|
import io.anuke.arc.util.Strings;
|
||||||
|
import io.anuke.arc.util.serialization.Base64Coder;
|
||||||
|
import io.anuke.net.KryoClient;
|
||||||
|
import io.anuke.net.KryoServer;
|
||||||
import io.anuke.mindustry.core.Platform;
|
import io.anuke.mindustry.core.Platform;
|
||||||
import io.anuke.mindustry.game.Saves.SaveSlot;
|
import io.anuke.mindustry.game.Saves.SaveSlot;
|
||||||
import io.anuke.mindustry.io.SaveIO;
|
import io.anuke.mindustry.io.SaveIO;
|
||||||
import io.anuke.mindustry.net.Net;
|
import io.anuke.mindustry.net.Net;
|
||||||
import io.anuke.mindustry.ui.dialogs.FileChooser;
|
import io.anuke.mindustry.ui.dialogs.FileChooser;
|
||||||
import io.anuke.ucore.function.Consumer;
|
|
||||||
import io.anuke.ucore.scene.ui.layout.Unit;
|
|
||||||
import io.anuke.ucore.util.Bundles;
|
|
||||||
import io.anuke.ucore.util.Strings;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
@@ -39,7 +39,7 @@ import java.util.ArrayList;
|
|||||||
|
|
||||||
import static io.anuke.mindustry.Vars.*;
|
import static io.anuke.mindustry.Vars.*;
|
||||||
|
|
||||||
public class AndroidLauncher extends PatchedAndroidApplication{
|
public class AndroidLauncher extends AndroidApplication{
|
||||||
public static final int PERMISSION_REQUEST_CODE = 1;
|
public static final int PERMISSION_REQUEST_CODE = 1;
|
||||||
boolean doubleScaleTablets = true;
|
boolean doubleScaleTablets = true;
|
||||||
FileChooser chooser;
|
FileChooser chooser;
|
||||||
@@ -49,6 +49,7 @@ public class AndroidLauncher extends PatchedAndroidApplication{
|
|||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
|
AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
|
||||||
config.useImmersiveMode = true;
|
config.useImmersiveMode = true;
|
||||||
|
config.depth = 0;
|
||||||
Platform.instance = new Platform(){
|
Platform.instance = new Platform(){
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -161,23 +162,23 @@ public class AndroidLauncher extends PatchedAndroidApplication{
|
|||||||
InputStream inStream;
|
InputStream inStream;
|
||||||
if(myFile != null) inStream = new FileInputStream(myFile);
|
if(myFile != null) inStream = new FileInputStream(myFile);
|
||||||
else inStream = getContentResolver().openInputStream(uri);
|
else inStream = getContentResolver().openInputStream(uri);
|
||||||
Gdx.app.postRunnable(() -> {
|
Core.app.post(() -> {
|
||||||
if(save){ //open save
|
if(save){ //open save
|
||||||
System.out.println("Opening save.");
|
System.out.println("Opening save.");
|
||||||
FileHandle file = Gdx.files.local("temp-save." + saveExtension);
|
FileHandle file = Core.files.local("temp-save." + saveExtension);
|
||||||
file.write(inStream, false);
|
file.write(inStream, false);
|
||||||
if(SaveIO.isSaveValid(file)){
|
if(SaveIO.isSaveValid(file)){
|
||||||
try{
|
try{
|
||||||
SaveSlot slot = control.saves.importSave(file);
|
SaveSlot slot = control.saves.importSave(file);
|
||||||
ui.load.runLoadSave(slot);
|
ui.load.runLoadSave(slot);
|
||||||
}catch(IOException e){
|
}catch(IOException e){
|
||||||
ui.showError(Bundles.format("text.save.import.fail", Strings.parseException(e, false)));
|
ui.showError(Core.bundle.format("text.save.import.fail", Strings.parseException(e, false)));
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
ui.showError("$text.save.import.invalid");
|
ui.showError("$text.save.import.invalid");
|
||||||
}
|
}
|
||||||
}else if(map){ //open map
|
}else if(map){ //open map
|
||||||
Gdx.app.postRunnable(() -> {
|
Core.app.post(() -> {
|
||||||
System.out.println("Opening map.");
|
System.out.println("Opening map.");
|
||||||
if(!ui.editor.isShown()){
|
if(!ui.editor.isShown()){
|
||||||
ui.editor.show();
|
ui.editor.show();
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
package io.anuke.mindustry;
|
|
||||||
|
|
||||||
import com.badlogic.gdx.backends.android.AndroidApplication;
|
|
||||||
import java.util.concurrent.ExecutorService;
|
|
||||||
import java.util.concurrent.Executors;
|
|
||||||
|
|
||||||
public class PatchedAndroidApplication extends AndroidApplication {
|
|
||||||
private final ExecutorService exec = Executors.newSingleThreadExecutor();
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onPause () {
|
|
||||||
if(useImmersiveMode) {
|
|
||||||
exec.submit(() -> {
|
|
||||||
try {Thread.sleep(100);} catch (InterruptedException ignored) {}
|
|
||||||
graphics.onDrawFrame(null);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
super.onPause();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -107,8 +107,6 @@ public class RemoteMethodAnnotationProcessor extends AbstractProcessor{
|
|||||||
ClassEntry clas = new ClassEntry(callLocation);
|
ClassEntry clas = new ClassEntry(callLocation);
|
||||||
classMap.put(callLocation, clas);
|
classMap.put(callLocation, clas);
|
||||||
classes.add(clas);
|
classes.add(clas);
|
||||||
|
|
||||||
Utils.messager.printMessage(Kind.NOTE, "Generating class '" + clas.name + "'.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ClassEntry entry = classMap.get(callLocation);
|
ClassEntry entry = classMap.get(callLocation);
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ public class RemoteWriteGenerator{
|
|||||||
method.beginControlFlow("if(" + getCheckString(methodEntry.where) + ")");
|
method.beginControlFlow("if(" + getCheckString(methodEntry.where) + ")");
|
||||||
|
|
||||||
//add statement to create packet from pool
|
//add statement to create packet from pool
|
||||||
method.addStatement("$1N packet = $2N.obtain($1N.class, $1N::new)", "io.anuke.mindustry.net.Packets.InvokePacket", "io.anuke.ucore.util.Pooling");
|
method.addStatement("$1N packet = $2N.obtain($1N.class, $1N::new)", "io.anuke.mindustry.net.Packets.InvokePacket", "io.anuke.arc.util.pooling.Pools");
|
||||||
//assign buffer
|
//assign buffer
|
||||||
method.addStatement("packet.writeBuffer = TEMP_BUFFER");
|
method.addStatement("packet.writeBuffer = TEMP_BUFFER");
|
||||||
//assign priority
|
//assign priority
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ public class SerializeAnnotationProcessor extends AbstractProcessor{
|
|||||||
Set<TypeElement> elements = ElementFilter.typesIn(roundEnv.getElementsAnnotatedWith(Serialize.class));
|
Set<TypeElement> elements = ElementFilter.typesIn(roundEnv.getElementsAnnotatedWith(Serialize.class));
|
||||||
|
|
||||||
TypeSpec.Builder classBuilder = TypeSpec.classBuilder(className).addModifiers(Modifier.PUBLIC);
|
TypeSpec.Builder classBuilder = TypeSpec.classBuilder(className).addModifiers(Modifier.PUBLIC);
|
||||||
|
classBuilder.addAnnotation(AnnotationSpec.builder(SuppressWarnings.class).addMember("value", "\"unchecked\"").build());
|
||||||
MethodSpec.Builder method = MethodSpec.methodBuilder("init").addModifiers(Modifier.PUBLIC, Modifier.STATIC);
|
MethodSpec.Builder method = MethodSpec.methodBuilder("init").addModifiers(Modifier.PUBLIC, Modifier.STATIC);
|
||||||
|
|
||||||
for(TypeElement elem : elements){
|
for(TypeElement elem : elements){
|
||||||
@@ -52,7 +53,7 @@ public class SerializeAnnotationProcessor extends AbstractProcessor{
|
|||||||
|
|
||||||
TypeSpec.Builder serializer = TypeSpec.anonymousClassBuilder("")
|
TypeSpec.Builder serializer = TypeSpec.anonymousClassBuilder("")
|
||||||
.addSuperinterface(ParameterizedTypeName.get(
|
.addSuperinterface(ParameterizedTypeName.get(
|
||||||
ClassName.bestGuess("io.anuke.ucore.io.TypeSerializer"), type));
|
ClassName.bestGuess("io.anuke.arc.Settings.TypeSerializer"), type));
|
||||||
|
|
||||||
MethodSpec.Builder writeMethod = MethodSpec.methodBuilder("write")
|
MethodSpec.Builder writeMethod = MethodSpec.methodBuilder("write")
|
||||||
.returns(void.class)
|
.returns(void.class)
|
||||||
@@ -83,8 +84,8 @@ public class SerializeAnnotationProcessor extends AbstractProcessor{
|
|||||||
writeMethod.addStatement("stream.write" + capName + "(object." + name + ")");
|
writeMethod.addStatement("stream.write" + capName + "(object." + name + ")");
|
||||||
readMethod.addStatement("object." + name + "= stream.read" + capName + "()");
|
readMethod.addStatement("object." + name + "= stream.read" + capName + "()");
|
||||||
}else{
|
}else{
|
||||||
writeMethod.addStatement("io.anuke.ucore.core.Settings.getSerializer(" + typeName+ ".class).write(stream, object." + name + ")");
|
writeMethod.addStatement("io.anuke.arc.Core.settings.getSerializer(" + typeName+ ".class).write(stream, object." + name + ")");
|
||||||
readMethod.addStatement("object." + name + " = (" +typeName+")io.anuke.ucore.core.Settings.getSerializer(" + typeName+ ".class).read(stream)");
|
readMethod.addStatement("object." + name + " = (" +typeName+")io.anuke.arc.Core.settings.getSerializer(" + typeName+ ".class).read(stream)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,7 +94,7 @@ public class SerializeAnnotationProcessor extends AbstractProcessor{
|
|||||||
serializer.addMethod(writeMethod.build());
|
serializer.addMethod(writeMethod.build());
|
||||||
serializer.addMethod(readMethod.build());
|
serializer.addMethod(readMethod.build());
|
||||||
|
|
||||||
method.addStatement("io.anuke.ucore.core.Settings.setSerializer($N, $L)", Utils.elementUtils.getBinaryName(elem).toString().replace('$', '.') + ".class", serializer.build());
|
method.addStatement("io.anuke.arc.Core.settings.setSerializer($N, $L)", Utils.elementUtils.getBinaryName(elem).toString().replace('$', '.') + ".class", serializer.build());
|
||||||
}
|
}
|
||||||
|
|
||||||
classBuilder.addMethod(method.build());
|
classBuilder.addMethod(method.build());
|
||||||
|
|||||||
160
build.gradle
@@ -1,30 +1,58 @@
|
|||||||
buildscript {
|
buildscript{
|
||||||
repositories {
|
repositories{
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
google()
|
google()
|
||||||
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
maven{ url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
|
||||||
classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.3.0'
|
dependencies{
|
||||||
|
classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.3.5'
|
||||||
classpath "com.badlogicgames.gdx:gdx-tools:1.9.9"
|
classpath "com.badlogicgames.gdx:gdx-tools:1.9.9"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects{
|
||||||
apply plugin: "idea"
|
apply plugin: "idea"
|
||||||
|
|
||||||
version = 'release'
|
version = 'release'
|
||||||
|
|
||||||
ext {
|
ext{
|
||||||
versionNumber = '4'
|
versionNumber = '4'
|
||||||
versionModifier = 'alpha'
|
versionModifier = 'alpha'
|
||||||
if (!project.hasProperty("versionType")) versionType = 'official'
|
if(!project.hasProperty("versionType")) versionType = 'official'
|
||||||
appName = 'Mindustry'
|
appName = 'Mindustry'
|
||||||
gdxVersion = '1.9.9'
|
gdxVersion = '1.9.9'
|
||||||
roboVMVersion = '2.3.0'
|
roboVMVersion = '2.3.0'
|
||||||
uCoreVersion = '5871d2d0385370bc937fed3e5e301d6962a50476'
|
arcHash = null
|
||||||
|
|
||||||
|
localArc = {
|
||||||
|
return (System.properties["release"] == null || System.properties["release"] == "false") && new File(projectDir.parent, '../Arc').exists()
|
||||||
|
}
|
||||||
|
|
||||||
|
getArcHash = {
|
||||||
|
//get latest commit hash from gtihub since JITPack's '-snapshot' version doesn't work correctly
|
||||||
|
if(arcHash == null){
|
||||||
|
try{
|
||||||
|
arcHash = 'git ls-remote https://github.com/Anuken/Arc.git'.execute().text.split("\t")[0]//new JsonSlurper().parse(new URL("https://api.github.com/repos/Anuken/Arc/commits/master"))["sha"]
|
||||||
|
}catch(e){
|
||||||
|
e.printStackTrace()
|
||||||
|
arcHash = "-SNAPSHOT";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return arcHash
|
||||||
|
}
|
||||||
|
|
||||||
|
arcModule = { String name ->
|
||||||
|
if(localArc()){
|
||||||
|
return project(":Arc:$name")
|
||||||
|
}else{
|
||||||
|
//skip to last submodule
|
||||||
|
if(name.contains(':')) name = name.split(':').last()
|
||||||
|
return "com.github.Anuken.Arc:$name:${getArcHash()}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
getVersionString = {
|
getVersionString = {
|
||||||
String buildVersion = getBuildVersion()
|
String buildVersion = getBuildVersion()
|
||||||
@@ -43,7 +71,7 @@ allprojects {
|
|||||||
generateLocales = {
|
generateLocales = {
|
||||||
def output = 'en\n'
|
def output = 'en\n'
|
||||||
def bundles = new File(project(':core').projectDir, 'assets/bundles/')
|
def bundles = new File(project(':core').projectDir, 'assets/bundles/')
|
||||||
bundles.listFiles().each { other ->
|
bundles.listFiles().each{ other ->
|
||||||
if(other.name == "bundle.properties") return
|
if(other.name == "bundle.properties") return
|
||||||
output += other.name.substring("bundle".length() + 1, other.name.lastIndexOf('.')) + "\n"
|
output += other.name.substring("bundle".length() + 1, other.name.lastIndexOf('.')) + "\n"
|
||||||
}
|
}
|
||||||
@@ -56,10 +84,9 @@ allprojects {
|
|||||||
|
|
||||||
try{
|
try{
|
||||||
pfile.createNewFile()
|
pfile.createNewFile()
|
||||||
}catch (Exception ignored){}
|
}catch(Exception ignored){}
|
||||||
|
|
||||||
if(pfile.exists()) {
|
|
||||||
|
|
||||||
|
if(pfile.exists()){
|
||||||
props.load(new FileInputStream(pfile))
|
props.load(new FileInputStream(pfile))
|
||||||
|
|
||||||
String buildid = getBuildVersion()
|
String buildid = getBuildVersion()
|
||||||
@@ -74,39 +101,40 @@ allprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories{
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
maven{ url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
||||||
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
|
maven{ url "https://oss.sonatype.org/content/repositories/releases/" }
|
||||||
maven { url 'https://jitpack.io' }
|
maven{ url 'https://jitpack.io' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
project(":desktop") {
|
project(":desktop"){
|
||||||
apply plugin: "java"
|
apply plugin: "java"
|
||||||
|
|
||||||
dependencies {
|
dependencies{
|
||||||
compile project(":core")
|
compile project(":core")
|
||||||
compile project(":kryonet")
|
compile project(":net")
|
||||||
|
|
||||||
if(new File(projectDir.parent, '../debug').exists() && System.properties["release"] == null) compile project(":debug")
|
if(new File(projectDir.parent, '../debug').exists() && System.properties["release"] == null) compile project(":debug")
|
||||||
|
|
||||||
compile "com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion"
|
|
||||||
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
|
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
|
||||||
compile "com.badlogicgames.gdx:gdx-controllers-lwjgl3:$gdxVersion"
|
|
||||||
compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
|
compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
|
||||||
|
|
||||||
|
compile arcModule("backends:backend-lwjgl3")
|
||||||
compile 'com.github.MinnDevelopment:java-discord-rpc:v2.0.0'
|
compile 'com.github.MinnDevelopment:java-discord-rpc:v2.0.0'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
project(":ios") {
|
project(":ios"){
|
||||||
apply plugin: "java"
|
apply plugin: "java"
|
||||||
apply plugin: "robovm"
|
apply plugin: "robovm"
|
||||||
|
|
||||||
task copyGen{
|
task copyGen{
|
||||||
doLast {
|
doLast{
|
||||||
copy {
|
copy{
|
||||||
from("../core/build/classes/java/main/io/anuke/mindustry/gen/") {
|
from("../core/build/classes/java/main/io/anuke/mindustry/gen/"){
|
||||||
include "**/*.java"
|
include "**/*.java"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,116 +162,96 @@ project(":ios") {
|
|||||||
props['app.mainclass'] = 'io.anuke.mindustry.IOSLauncher'
|
props['app.mainclass'] = 'io.anuke.mindustry.IOSLauncher'
|
||||||
props['app.executable'] = 'IOSLauncher'
|
props['app.executable'] = 'IOSLauncher'
|
||||||
props['app.name'] = 'Mindustry'
|
props['app.name'] = 'Mindustry'
|
||||||
props['app.build'] = (!props.containsKey("app.build") ? 40 : props['app.build'].toInteger() + 1)+""
|
props['app.build'] = (!props.containsKey("app.build") ? 40 : props['app.build'].toInteger() + 1) + ""
|
||||||
props.store(vfile.newWriter(), null)
|
props.store(vfile.newWriter(), null)
|
||||||
}
|
}
|
||||||
|
|
||||||
build.dependsOn(incrementConfig)
|
build.dependsOn(incrementConfig)
|
||||||
build.dependsOn(copyGen)
|
if(file('robovm.properties').exists()){
|
||||||
|
build.dependsOn(copyGen)
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies{
|
||||||
compile project(":core")
|
compile project(":core")
|
||||||
implementation project(":kryonet")
|
compile project(":net")
|
||||||
|
|
||||||
|
compile arcModule("backends:backend-robovm")
|
||||||
|
|
||||||
compile "com.mobidevelop.robovm:robovm-rt:$roboVMVersion"
|
compile "com.mobidevelop.robovm:robovm-rt:$roboVMVersion"
|
||||||
compile "com.mobidevelop.robovm:robovm-cocoatouch:$roboVMVersion"
|
compile "com.mobidevelop.robovm:robovm-cocoatouch:$roboVMVersion"
|
||||||
compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion"
|
|
||||||
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
|
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
|
||||||
compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-ios"
|
compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-ios"
|
||||||
//compileOnly project(":annotations")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
project(":core") {
|
project(":core"){
|
||||||
apply plugin: "java"
|
apply plugin: "java"
|
||||||
|
|
||||||
task finish {
|
task finish{
|
||||||
generateLocales()
|
generateLocales()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies{
|
||||||
build.finalizedBy(finish)
|
build.finalizedBy(finish)
|
||||||
|
|
||||||
def comp = System.properties["release"] == null || System.properties["release"] == "false"
|
compile arcModule("arc-core")
|
||||||
if(!comp) println("Note: Compiling release build.")
|
compile arcModule("extensions:freetype")
|
||||||
|
|
||||||
if(new File(projectDir.parent, '../uCore').exists() && comp){
|
|
||||||
compile project(":uCore")
|
|
||||||
}else{
|
|
||||||
compile "com.github.anuken:ucore:$uCoreVersion"
|
|
||||||
}
|
|
||||||
|
|
||||||
if(new File(projectDir.parent, '../GDXGifRecorder').exists() && comp) {
|
|
||||||
compile project(":GDXGifRecorder")
|
|
||||||
}
|
|
||||||
|
|
||||||
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
|
|
||||||
compile "com.badlogicgames.gdx:gdx-controllers:$gdxVersion"
|
|
||||||
compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
|
|
||||||
|
|
||||||
compileOnly project(":annotations")
|
compileOnly project(":annotations")
|
||||||
annotationProcessor project(":annotations")
|
annotationProcessor project(":annotations")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
project(":server") {
|
project(":server"){
|
||||||
apply plugin: "java"
|
apply plugin: "java"
|
||||||
|
|
||||||
configurations {
|
dependencies{
|
||||||
if(findProject(":android") != null){
|
|
||||||
compile.exclude module: android
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
|
|
||||||
compile project(":core")
|
compile project(":core")
|
||||||
compile project(":kryonet")
|
compile project(":net")
|
||||||
compile "com.badlogicgames.gdx:gdx-backend-headless:$gdxVersion"
|
compile arcModule("backends:backend-headless")
|
||||||
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
project(":tests"){
|
project(":tests"){
|
||||||
apply plugin: "java"
|
apply plugin: "java"
|
||||||
|
|
||||||
dependencies {
|
dependencies{
|
||||||
testImplementation project(":core")
|
testImplementation project(":core")
|
||||||
testImplementation('org.junit.jupiter:junit-jupiter-api:5.1.0')
|
testImplementation "org.junit.jupiter:junit-jupiter-params:5.3.1"
|
||||||
testRuntimeOnly('org.junit.jupiter:junit-jupiter-engine:5.1.0')
|
testImplementation "org.junit.jupiter:junit-jupiter-api:5.3.1"
|
||||||
testImplementation "com.badlogicgames.gdx:gdx-backend-headless:$gdxVersion"
|
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.3.1"
|
||||||
testImplementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
|
compile arcModule("backends:backend-headless")
|
||||||
}
|
}
|
||||||
|
|
||||||
test {
|
test{
|
||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
workingDir = new File("../core/assets")
|
workingDir = new File("../core/assets")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
project(":tools") {
|
project(":tools"){
|
||||||
apply plugin: "java"
|
apply plugin: "java"
|
||||||
|
|
||||||
dependencies {
|
dependencies{
|
||||||
compile project(":core")
|
compile project(":core")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
project(":annotations") {
|
project(":annotations"){
|
||||||
apply plugin: "java"
|
apply plugin: "java"
|
||||||
|
|
||||||
dependencies {
|
dependencies{
|
||||||
compile 'com.squareup:javapoet:1.11.0'
|
compile 'com.squareup:javapoet:1.11.0'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
project(":kryonet") {
|
project(":net"){
|
||||||
apply plugin: "java"
|
apply plugin: "java"
|
||||||
|
|
||||||
dependencies {
|
dependencies{
|
||||||
compile project(":core")
|
compile project(":core")
|
||||||
compile "org.lz4:lz4-java:1.4.1"
|
compile "org.lz4:lz4-java:1.4.1"
|
||||||
compile 'com.github.Anuken:kryonet:53b10247b1'
|
compile 'com.github.Anuken:kryonet:a64d2280880e80566ca1bdaffa55de43e51cad38'
|
||||||
compile 'com.github.Anuken:WaifUPnP:05eb46bc577fd7674596946ba288c96c0cedd893'
|
compile 'com.github.Anuken:WaifUPnP:05eb46bc577fd7674596946ba288c96c0cedd893'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 108 B |
|
Before Width: | Height: | Size: 85 B |
|
Before Width: | Height: | Size: 89 B |
|
Before Width: | Height: | Size: 101 B |
|
Before Width: | Height: | Size: 110 B |
|
Before Width: | Height: | Size: 120 B |
|
Before Width: | Height: | Size: 133 B |
|
Before Width: | Height: | Size: 90 B |
|
Before Width: | Height: | Size: 88 B |
|
Before Width: | Height: | Size: 107 B |
|
Before Width: | Height: | Size: 120 B |
|
Before Width: | Height: | Size: 127 B |
|
Before Width: | Height: | Size: 96 B |
|
Before Width: | Height: | Size: 93 B |
|
Before Width: | Height: | Size: 211 B After Width: | Height: | Size: 397 B |
|
Before Width: | Height: | Size: 133 B After Width: | Height: | Size: 264 B |
|
Before Width: | Height: | Size: 122 B After Width: | Height: | Size: 219 B |
|
Before Width: | Height: | Size: 170 B After Width: | Height: | Size: 236 B |
|
Before Width: | Height: | Size: 241 B After Width: | Height: | Size: 329 B |
|
Before Width: | Height: | Size: 136 B After Width: | Height: | Size: 242 B |
|
Before Width: | Height: | Size: 124 B After Width: | Height: | Size: 221 B |
|
Before Width: | Height: | Size: 70 B After Width: | Height: | Size: 70 B |
@@ -2,5 +2,7 @@
|
|||||||
duplicatePadding: true,
|
duplicatePadding: true,
|
||||||
combineSubdirectories: true,
|
combineSubdirectories: true,
|
||||||
flattenPaths: true,
|
flattenPaths: true,
|
||||||
fast: true
|
maxWidth: 2048,
|
||||||
|
maxHeight: 2048,
|
||||||
|
fast: true,
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 256 B After Width: | Height: | Size: 294 B |
|
Before Width: | Height: | Size: 261 B After Width: | Height: | Size: 282 B |
|
Before Width: | Height: | Size: 253 B After Width: | Height: | Size: 277 B |
|
Before Width: | Height: | Size: 271 B After Width: | Height: | Size: 251 B |
|
Before Width: | Height: | Size: 247 B After Width: | Height: | Size: 268 B |
|
Before Width: | Height: | Size: 284 B After Width: | Height: | Size: 303 B |
|
Before Width: | Height: | Size: 112 B After Width: | Height: | Size: 202 B |
|
Before Width: | Height: | Size: 282 B After Width: | Height: | Size: 320 B |
|
Before Width: | Height: | Size: 392 B After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 238 B After Width: | Height: | Size: 237 B |
|
Before Width: | Height: | Size: 248 B After Width: | Height: | Size: 250 B |
|
After Width: | Height: | Size: 401 B |
|
After Width: | Height: | Size: 156 B |
|
After Width: | Height: | Size: 280 B |
|
After Width: | Height: | Size: 251 B |
|
After Width: | Height: | Size: 269 B |
|
After Width: | Height: | Size: 223 B |
|
After Width: | Height: | Size: 350 B |
|
After Width: | Height: | Size: 228 B |
|
After Width: | Height: | Size: 368 B |
|
After Width: | Height: | Size: 218 B |
|
After Width: | Height: | Size: 320 B |
|
After Width: | Height: | Size: 186 B |
|
After Width: | Height: | Size: 319 B |
|
After Width: | Height: | Size: 373 B |
|
After Width: | Height: | Size: 362 B |
|
After Width: | Height: | Size: 199 B |
|
After Width: | Height: | Size: 378 B |
|
After Width: | Height: | Size: 348 B |
|
After Width: | Height: | Size: 335 B |
|
After Width: | Height: | Size: 179 B |
|
After Width: | Height: | Size: 321 B |
|
After Width: | Height: | Size: 165 B |
|
After Width: | Height: | Size: 306 B |
|
After Width: | Height: | Size: 168 B |
|
After Width: | Height: | Size: 283 B |
|
After Width: | Height: | Size: 241 B |
|
After Width: | Height: | Size: 389 B |
|
After Width: | Height: | Size: 249 B |
|
After Width: | Height: | Size: 404 B |
|
After Width: | Height: | Size: 226 B |
|
After Width: | Height: | Size: 333 B |
|
After Width: | Height: | Size: 195 B |
|
After Width: | Height: | Size: 342 B |
|
After Width: | Height: | Size: 374 B |
|
After Width: | Height: | Size: 363 B |
|
After Width: | Height: | Size: 198 B |
|
After Width: | Height: | Size: 379 B |
|
After Width: | Height: | Size: 363 B |
|
After Width: | Height: | Size: 355 B |
|
After Width: | Height: | Size: 187 B |
|
After Width: | Height: | Size: 335 B |
|
After Width: | Height: | Size: 381 B |
|
After Width: | Height: | Size: 295 B |
|
After Width: | Height: | Size: 461 B |
|
After Width: | Height: | Size: 427 B |
|
After Width: | Height: | Size: 464 B |
|
After Width: | Height: | Size: 541 B |
|
After Width: | Height: | Size: 1.0 KiB |
BIN
core/assets-raw/sprites_replacement/blocks/power/power-node.png
Normal file
|
After Width: | Height: | Size: 460 B |
|
After Width: | Height: | Size: 472 B |
BIN
core/assets-raw/sprites_replacement/blocks/power/powervoid.png
Normal file
|
After Width: | Height: | Size: 438 B |
|
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 68 B |
|
Before Width: | Height: | Size: 883 B After Width: | Height: | Size: 883 B |
BIN
core/assets-raw/sprites_replacement/shapes/clear.png
Normal file
|
After Width: | Height: | Size: 70 B |