Make editor scripts work with latest Gridarta.

git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@10625 282e977c-c81d-0410-88c4-b93c2d0d6712
master
akirschbaum 2008-11-20 21:58:48 +00:00
parent b6db99ca2b
commit 3f7dd81011
4 changed files with 7 additions and 6 deletions

View File

@ -311,7 +311,7 @@ if (baseDirectory.endsWith("/")) {
baseDirectory = baseDirectory.substring(0, baseDirectory.length() - 1);
}
String mapDefaultFolder = globalSettings.getMapDefaultFolder();
String mapDefaultFolder = globalSettings.getMapsDirectory().getPath();
String rootDirectory = mapDefaultFolder + baseDirectory;
Iterator it = new RecursiveFileIterator(new File(rootDirectory));
while (it.hasNext()) {

View File

@ -45,7 +45,7 @@ if (baseDirectory.endsWith("/")) {
baseDirectory = baseDirectory.substring(0, baseDirectory.length() - 1);
}
String mapDefaultFolder = globalSettings.getMapDefaultFolder();
String mapDefaultFolder = globalSettings.getMapsDirectory().getPath();
String rootDirectory = mapDefaultFolder + baseDirectory;
Iterator it = new RecursiveFileIterator(new File(rootDirectory));
while (it.hasNext()) {

View File

@ -58,8 +58,9 @@ void checkMap(File mapFile, String mapPath) {
sb.append(validationError);
GameObject gameObject = validationError.getGameObject();
if (gameObject != null) {
Iterator it2 = validationError.getGameObjects().iterator();
while (it2.hasNext()) {
GameObject gameObject = it2.next();
sb.append(" [").append(gameObject.getBestName()).append(']');
}
@ -87,7 +88,7 @@ try {
baseDirectory = baseDirectory.substring(0, baseDirectory.length() - 1);
}
String mapDefaultFolder = globalSettings.getMapDefaultFolder();
String mapDefaultFolder = globalSettings.getMapsDirectory().getPath();
String rootDirectory = mapDefaultFolder + baseDirectory;
Iterator it = new RecursiveFileIterator(new File(rootDirectory));
while (it.hasNext()) {

View File

@ -72,7 +72,7 @@ void checkDaList() {
DestHeight = TileHeight.intValue() * NumY.intValue();
if (Location == null || Location.length() < 1) {
Location = globalSettings.getMapDefaultFolder();
Location = globalSettings.getMapsDirectory().getPath();
print("autodetected location " + Location);
}