diff --git a/core/src/io/anuke/mindustry/world/Tile.java b/core/src/io/anuke/mindustry/world/Tile.java index 062b68e4b9..380f1be1d6 100644 --- a/core/src/io/anuke/mindustry/world/Tile.java +++ b/core/src/io/anuke/mindustry/world/Tile.java @@ -38,7 +38,7 @@ public class Tile implements PosTrait, TargetTrait{ private byte cliffs; private Block wall; private Floor floor; - /** Rotation, 0-3. Also used to store offload location for routers, in which case it can be any number. */ + /** Rotation, 0-3. Also used to store offload location, in which case it can be any number. */ private byte rotation; /** Team ordinal. */ private byte team; diff --git a/desktop/src/io/anuke/mindustry/desktop/DesktopLauncher.java b/desktop/src/io/anuke/mindustry/desktop/DesktopLauncher.java index 02833bcb52..15950177d8 100644 --- a/desktop/src/io/anuke/mindustry/desktop/DesktopLauncher.java +++ b/desktop/src/io/anuke/mindustry/desktop/DesktopLauncher.java @@ -1,32 +1,21 @@ package io.anuke.mindustry.desktop; -import com.apple.eawt.Application; import com.badlogic.gdx.ApplicationListener; import com.badlogic.gdx.Files.FileType; -import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Preferences; import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application; import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration; import com.badlogic.gdx.backends.lwjgl3.Lwjgl3FileHandle; -import com.badlogic.gdx.files.FileHandle; import com.badlogic.gdx.utils.ObjectMap; import io.anuke.kryonet.KryoClient; import io.anuke.kryonet.KryoServer; import io.anuke.mindustry.Mindustry; import io.anuke.mindustry.core.Platform; -import io.anuke.mindustry.io.SaveIO; -import io.anuke.mindustry.game.Saves.SaveSlot; import io.anuke.mindustry.net.Net; import io.anuke.ucore.io.BinaryPreferences; -import io.anuke.ucore.util.Bundles; import io.anuke.ucore.util.OS; -import io.anuke.ucore.util.Strings; import java.io.File; -import java.io.IOException; -import java.util.List; - -import static io.anuke.mindustry.Vars.*; public class DesktopLauncher extends Lwjgl3Application{ ObjectMap prefmap; @@ -43,43 +32,6 @@ public class DesktopLauncher extends Lwjgl3Application{ config.setWindowedMode(960, 540); config.setWindowIcon("sprites/icon.png"); - if(OS.isMac){ - Application.getApplication().setOpenFileHandler(e -> { - List list = e.getFiles(); - - File target = (File) list.get(0); - - Gdx.app.postRunnable(() -> { - FileHandle file = OS.getAppDataDirectory("Mindustry").child("tmp").child(target.getName()); - - Gdx.files.absolute(target.getAbsolutePath()).copyTo(file); - - if(file.extension().equalsIgnoreCase(saveExtension)){ //open save - - if(SaveIO.isSaveValid(file)){ - try{ - SaveSlot slot = control.getSaves().importSave(file); - ui.load.runLoadSave(slot); - }catch(IOException e2){ - ui.showError(Bundles.format("text.save.import.fail", Strings.parseException(e2, false))); - } - }else{ - ui.showError("$text.save.import.invalid"); - } - - }else if(file.extension().equalsIgnoreCase(mapExtension)){ //open map - Gdx.app.postRunnable(() -> { - if(!ui.editor.isShown()){ - ui.editor.show(); - } - - ui.editor.beginEditMap(file.read()); - }); - } - }); - }); - } - Platform.instance = new DesktopPlatform(arg); Net.setClientProvider(new KryoClient());