Fixed bug with conveyor belt rotation not being saved
This commit is contained in:
+48
-1
@@ -4,7 +4,9 @@ sourceCompatibility = 1.8
|
||||
sourceSets.main.java.srcDirs = [ "src/" ]
|
||||
|
||||
project.ext.mainClassName = "io.anuke.mindustry.desktop.DesktopLauncher"
|
||||
project.ext.assetsDir = new File("../android/assets");
|
||||
project.ext.assetsDir = new File("../core/assets");
|
||||
|
||||
def PACKR_DIR = "/home/anuke/Documents/Packr/"
|
||||
|
||||
task run(dependsOn: classes, type: JavaExec) {
|
||||
main = project.mainClassName
|
||||
@@ -36,6 +38,51 @@ task dist(type: Jar) {
|
||||
|
||||
dist.dependsOn classes
|
||||
|
||||
task clearOut(type: Delete){
|
||||
delete "packr-out/"
|
||||
}
|
||||
|
||||
ext.getPlatform = {
|
||||
if(project.gradle.startParameter.taskNames.size() == 0 || !project.gradle.startParameter.taskNames.first().contains("packr")) return;
|
||||
|
||||
if (project.hasProperty("platform")) {
|
||||
def lc = platform.toLowerCase()
|
||||
if(lc.equals("windows")){
|
||||
return "windows64";
|
||||
}else if(lc.equals("linux")){
|
||||
return "linux64";
|
||||
}else if(lc.equals("mac")){
|
||||
return "mac";
|
||||
}else{
|
||||
throw new InvalidUserDataException("Invalid platform. Set platform with -Pplatform=windows/linux/mac");
|
||||
}
|
||||
}else{
|
||||
throw new InvalidUserDataException("No platform defined. Set platform with -Pplatform=windows/linux/mac");
|
||||
}
|
||||
}
|
||||
|
||||
//note: call desktop:dist beforehand
|
||||
task packrCmd(type: Exec) {
|
||||
|
||||
copy{
|
||||
into PACKR_DIR
|
||||
from "build/libs/desktop-1.0.jar"
|
||||
}
|
||||
|
||||
commandLine "java", "-jar", PACKR_DIR+"packr.jar", "--verbose", /*"--resources", project.ext.assetsDir,*/ "--platform", getPlatform(), "--executable", appName, "--output", "packr-out/", "--mainclass", project.ext.mainClassName, "--jdk", PACKR_DIR+"jdk-"+getPlatform()+".zip", "--classpath",
|
||||
"--", PACKR_DIR+"config.json"
|
||||
|
||||
}
|
||||
|
||||
task packrZip(type: Zip) {
|
||||
dependsOn "packrCmd"
|
||||
finalizedBy "clearOut"
|
||||
|
||||
from "packr-out/"
|
||||
archiveName appName + "-" + getPlatform() + ".zip"
|
||||
destinationDir(file("packr-export"))
|
||||
}
|
||||
|
||||
eclipse {
|
||||
project {
|
||||
name = appName + "-desktop"
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 568 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.0 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.5 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 887 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 MiB |
Binary file not shown.
@@ -1,9 +1,14 @@
|
||||
package io.anuke.mindustry.desktop;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application;
|
||||
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration;
|
||||
|
||||
import io.anuke.mindustry.Mindustry;
|
||||
import io.anuke.mindustry.io.SaveIO;
|
||||
import io.anuke.mindustry.io.SaveIO.FormatProvider;
|
||||
|
||||
public class DesktopLauncher {
|
||||
public static void main (String[] arg) {
|
||||
@@ -12,6 +17,15 @@ public class DesktopLauncher {
|
||||
config.setMaximized(true);
|
||||
config.useVsync(false);
|
||||
config.setWindowedMode(800, 600);
|
||||
|
||||
SaveIO.setFormatProvider(new FormatProvider(){
|
||||
SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss");
|
||||
|
||||
public String format(Date date){
|
||||
return format.format(date);
|
||||
}
|
||||
});
|
||||
|
||||
new Lwjgl3Application(new Mindustry(), config);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user