diff options
author | Jared Adams <jaxad0127@gmail.com> | 2011-06-01 15:27:26 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2011-06-01 15:37:09 -0600 |
commit | bd4e6008389cf39e90ddc439939106761e61212d (patch) | |
tree | 8d13fc5797044963f13fda93c4d27b179a5483e4 | |
parent | c2ce998f28b9d8126b2050747e83e635d4a26ffb (diff) | |
download | tools-bd4e6008389cf39e90ddc439939106761e61212d.tar.gz tools-bd4e6008389cf39e90ddc439939106761e61212d.tar.bz2 tools-bd4e6008389cf39e90ddc439939106761e61212d.tar.xz tools-bd4e6008389cf39e90ddc439939106761e61212d.zip |
Change the Converter to use different folder names
And update everything to use it.
-rw-r--r-- | tmwcon/src/converter/Process.java | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/tmwcon/src/converter/Process.java b/tmwcon/src/converter/Process.java index 8b01d0d..92fa3da 100644 --- a/tmwcon/src/converter/Process.java +++ b/tmwcon/src/converter/Process.java @@ -1,5 +1,5 @@ /* - * TMWServ to eAthena Converter (c) 2008 Jared Adams + * TMWServ to eAthena Converter (c) 2008, 2011 Jared Adams * License: GPL, v2 or later */ @@ -131,11 +131,12 @@ public class Process { } } - private static void makeInclude(String name, File folder) { + private static void makeInclude(String name, String title, File folder) { File _import = new File(folder, importFile); List<String> output_elements = new ArrayList<String>(); processFiles(folder, output_elements); PrintWriter importOut = Main.getWriter(_import); + importOut.printf("// Map %s: %s\n", name, title); importOut.printf("// This file is generated automatically. All manually changes will be removed when running the Converter.\nmap: %s.gat\n", name); Collections.sort(output_elements); for (String s : output_elements) @@ -152,12 +153,6 @@ public class Process { String title = getProp(props, "name", ""); String folderName = scriptDirectory + name; - if (title.length() > 0) { - folderName += "_" + title.replaceAll("\\s", "_").replaceAll("[^A-Za-z0-9\\-_]", ""); - title = name + " " + title; - } else { - title = name; - } File folder = new File(baseFolder + folderName); folder.mkdirs(); @@ -168,12 +163,12 @@ public class Process { if (wlkFile.exists() && mapFile.lastModified() < wlkFile.lastModified()) { System.out.println("Up to date, skipping"); - makeInclude(name, folder); + makeInclude(name, title, folder); return folderName; } if (summary != null) { - summary.printf("\tName: '%s'\n", title); + summary.printf("\tName: %s: '%s'\n", name, title); summary.printf("\tMusic: '%s'\n", getProp(props, "music", "")); summary.printf("\tMinimap: '%s'\n", getProp(props, "minimap", "")); } @@ -209,7 +204,7 @@ public class Process { mobOut.flush(); mobOut.close(); - makeInclude(name, folder); + makeInclude(name, title, folder); return folderName; } |