Make editor scripts work with latest Gridarta build.
git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@9158 282e977c-c81d-0410-88c4-b93c2d0d6712master
parent
1511921f17
commit
68e0d4b266
|
|
@ -309,7 +309,7 @@ if (baseDirectory.endsWith("/")) {
|
||||||
baseDirectory = baseDirectory.substring(0, baseDirectory.length() - 1);
|
baseDirectory = baseDirectory.substring(0, baseDirectory.length() - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
String mapDefaultFolder = mainControl.getMapDefaultFolder();
|
String mapDefaultFolder = mainControl.getGlobalSettings().getMapDefaultFolder();
|
||||||
String rootDirectory = mapDefaultFolder + baseDirectory;
|
String rootDirectory = mapDefaultFolder + baseDirectory;
|
||||||
Iterator it = new RecursiveFileIterator(new File(rootDirectory));
|
Iterator it = new RecursiveFileIterator(new File(rootDirectory));
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ if (baseDirectory.endsWith("/")) {
|
||||||
baseDirectory = baseDirectory.substring(0, baseDirectory.length() - 1);
|
baseDirectory = baseDirectory.substring(0, baseDirectory.length() - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
String mapDefaultFolder = mainControl.getMapDefaultFolder();
|
String mapDefaultFolder = mainControl.getGlobalSettings().getMapDefaultFolder();
|
||||||
String rootDirectory = mapDefaultFolder + baseDirectory;
|
String rootDirectory = mapDefaultFolder + baseDirectory;
|
||||||
Iterator it = new RecursiveFileIterator(new File(rootDirectory));
|
Iterator it = new RecursiveFileIterator(new File(rootDirectory));
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ try {
|
||||||
baseDirectory = baseDirectory.substring(0, baseDirectory.length() - 1);
|
baseDirectory = baseDirectory.substring(0, baseDirectory.length() - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
String mapDefaultFolder = mainControl.getMapDefaultFolder();
|
String mapDefaultFolder = mainControl.getGlobalSettings().getMapDefaultFolder();
|
||||||
String rootDirectory = mapDefaultFolder + baseDirectory;
|
String rootDirectory = mapDefaultFolder + baseDirectory;
|
||||||
Iterator it = new RecursiveFileIterator(new File(rootDirectory));
|
Iterator it = new RecursiveFileIterator(new File(rootDirectory));
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ boolean updateMap(File mapFile, File pictureFile) {
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
try {
|
try {
|
||||||
ImageIO.write(map.getFullImage(), "png", pictureFile);
|
ImageIO.write(map.getRenderer().getFullImage(), "png", pictureFile);
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
print("cannot write " + pictureFile + ": " + ex.getMessage());
|
print("cannot write " + pictureFile + ": " + ex.getMessage());
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -74,7 +74,7 @@ void checkDaList() {
|
||||||
DestHeight = TileHeight.intValue() * NumY.intValue();
|
DestHeight = TileHeight.intValue() * NumY.intValue();
|
||||||
|
|
||||||
if (Location == null || Location.length() < 1) {
|
if (Location == null || Location.length() < 1) {
|
||||||
Location = mainControl.getMapDefaultFolder();
|
Location = mainControl.getGlobalSettings().getMapDefaultFolder();
|
||||||
print("autodetected location " + Location);
|
print("autodetected location " + Location);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue