diff --git a/tools/mapmerge/Source/.classpath b/tools/mapmerge/Source/.classpath
index a0cb530fa9d..8a11d5b17e5 100644
--- a/tools/mapmerge/Source/.classpath
+++ b/tools/mapmerge/Source/.classpath
@@ -2,6 +2,6 @@
-
+
diff --git a/tools/mapmerge/Source/bin/MapMergerMain.class b/tools/mapmerge/Source/bin/MapMergerMain.class
index c563253301f..6396bbc7a72 100644
Binary files a/tools/mapmerge/Source/bin/MapMergerMain.class and b/tools/mapmerge/Source/bin/MapMergerMain.class differ
diff --git a/tools/mapmerge/Source/bin/MapPatcher Source/Location.class b/tools/mapmerge/Source/bin/MapPatcher Source/Location.class
new file mode 100644
index 00000000000..a6ad8cca026
Binary files /dev/null and b/tools/mapmerge/Source/bin/MapPatcher Source/Location.class differ
diff --git a/tools/mapmerge/Source/bin/MapPatcher Source/Map.class b/tools/mapmerge/Source/bin/MapPatcher Source/Map.class
new file mode 100644
index 00000000000..814958657bc
Binary files /dev/null and b/tools/mapmerge/Source/bin/MapPatcher Source/Map.class differ
diff --git a/tools/mapmerge/Source/bin/MapPatcher Source/MapPatcher.class b/tools/mapmerge/Source/bin/MapPatcher Source/MapPatcher.class
new file mode 100644
index 00000000000..286c9a4a9c3
Binary files /dev/null and b/tools/mapmerge/Source/bin/MapPatcher Source/MapPatcher.class differ
diff --git a/tools/mapmerge/Source/bin/MapPatcher Source/SavingThread.class b/tools/mapmerge/Source/bin/MapPatcher Source/SavingThread.class
new file mode 100644
index 00000000000..0be31fccea8
Binary files /dev/null and b/tools/mapmerge/Source/bin/MapPatcher Source/SavingThread.class differ
diff --git a/tools/mapmerge/Source/bin/MapPatcher.jar b/tools/mapmerge/Source/bin/MapPatcher.jar
new file mode 100644
index 00000000000..5cbaad488c1
Binary files /dev/null and b/tools/mapmerge/Source/bin/MapPatcher.jar differ
diff --git a/tools/mapmerge/Source/src/MapMergerMain.java b/tools/mapmerge/Source/src/MapMergerMain.java
index 0f38cc91ea5..a85810a654a 100644
--- a/tools/mapmerge/Source/src/MapMergerMain.java
+++ b/tools/mapmerge/Source/src/MapMergerMain.java
@@ -11,47 +11,69 @@ public class MapMergerMain {
public static void main(String[] args) throws IOException{
- System.out.print("Path to _maps folder: ");
- String pathTo_maps = input.nextLine();
- Path fileDir = Paths.get(pathTo_maps);
- FileFinder finder = new FileFinder("*.dmm");
- Files.walkFileTree(fileDir, finder);
- ArrayList foundFiles = finder.foundPaths;
+ System.out.print("Path to maps folder: ");
+ Path pathToMaps = Paths.get(input.nextLine());
+ FileFinder dmmFinder = new FileFinder("*.dmm");
+ Files.walkFileTree(pathToMaps, dmmFinder);
+ ArrayList foundFiles = dmmFinder.foundPaths;
if (foundFiles.size() > 0) {
+
+
+ System.out.println("How many files do you want to merge?");
+ int selection1;
+ inputCheck:while(true){
+ while(!input.hasNextInt()){
+ String temp = input.next();
+ System.out.println(temp + " is not a valid int.");
+ }
+ selection1 = input.nextInt();
+ if(selection1 < 0){
+ System.out.println("Use a number greater than 0!");
+ continue inputCheck;
+ }else{
+ break inputCheck;
+ }
+ }
+
+ for(int numOfFiles = selection1; numOfFiles != 0; numOfFiles--){
+
for(int num = 0;num < foundFiles.size();num++){
System.out.println(num + ": " + foundFiles.get(num));
}
+
+ System.out.print("File to use: ");
+ int selection2;
+ inputCheck:while(true){
+ while(!input.hasNextInt()){
+ String temp = input.next();
+ System.out.println(temp + " is not a valid int.");
+ }
+ selection2 = input.nextInt();
+ if(selection2 < 0 || selection2 >= foundFiles.size()){
+ if(selection2 < 0){
+ System.out.println("Use a number greater than 0!");
+ }else{
+ System.out.println("Use a number less than " + foundFiles.size() +"!");
+ }
+ continue inputCheck;
+ }else{
+ break inputCheck;
+ }
+ }
+
+ String newMap = foundFiles.get(selection2) + "";
+ String oldMap = foundFiles.get(selection2) + ".backup";
+ String[] passInto = new String[4];
+ passInto[0] = "-clean";
+ passInto[1] = oldMap;
+ passInto[2] = newMap;
+ passInto[3] = newMap;
+ MapPatcher.main(passInto);
+ }
+
}else{
System.out.println("No files were found!");
}
- System.out.print("File to use: ");
- int selection;
- inputCheck:while(true){
- while(!input.hasNextInt()){
- String temp = input.next();
- System.out.println(temp + " is not a valid int.");
- }
- selection = input.nextInt();
- if(selection < 0 || selection >= foundFiles.size()){
- if(selection < 0){
- System.out.println("Use a number greater than 0!");
- }else{
- System.out.println("Use a number less than " + foundFiles.size() +"!");
- }
- continue inputCheck;
- }else{
- break inputCheck;
- }
- }
-
- String newMap = foundFiles.get(selection) + "";
- String oldMap = foundFiles.get(selection) + ".backup";
- String[] passInto = new String[4];
- passInto[0] = "-clean";
- passInto[1] = oldMap;
- passInto[2] = newMap;
- passInto[3] = newMap;
- MapPatcher.main(passInto);
}
}
\ No newline at end of file
diff --git a/tools/mapmerge/Source/src/MapPatcher/Location.java b/tools/mapmerge/Source/src/MapPatcher Source/Location.java
similarity index 100%
rename from tools/mapmerge/Source/src/MapPatcher/Location.java
rename to tools/mapmerge/Source/src/MapPatcher Source/Location.java
diff --git a/tools/mapmerge/Source/src/MapPatcher/Map.java b/tools/mapmerge/Source/src/MapPatcher Source/Map.java
similarity index 100%
rename from tools/mapmerge/Source/src/MapPatcher/Map.java
rename to tools/mapmerge/Source/src/MapPatcher Source/Map.java
diff --git a/tools/mapmerge/Source/src/MapPatcher/MapPatcher.java b/tools/mapmerge/Source/src/MapPatcher Source/MapPatcher.java
similarity index 100%
rename from tools/mapmerge/Source/src/MapPatcher/MapPatcher.java
rename to tools/mapmerge/Source/src/MapPatcher Source/MapPatcher.java
diff --git a/tools/mapmerge/Source/src/MapPatcher/SavingThread.java b/tools/mapmerge/Source/src/MapPatcher Source/SavingThread.java
similarity index 100%
rename from tools/mapmerge/Source/src/MapPatcher/SavingThread.java
rename to tools/mapmerge/Source/src/MapPatcher Source/SavingThread.java
diff --git a/tools/mapmerge/Source/src/MapPatcher.jar b/tools/mapmerge/Source/src/MapPatcher.jar
new file mode 100644
index 00000000000..5cbaad488c1
Binary files /dev/null and b/tools/mapmerge/Source/src/MapPatcher.jar differ