Implemented correct map loading, legacy format support

This commit is contained in:
Anuken
2019-03-12 10:36:04 -04:00
parent 0fd0abc6c0
commit 20427fdffa
15 changed files with 474 additions and 180 deletions

View File

@@ -39,8 +39,13 @@ public class MapsDialog extends FloatingDialog{
ui.showError(Core.bundle.format("editor.import.exists", name));
}else if(conflict != null){
ui.showConfirm("$confirm", "$editor.overwrite.confirm", () -> {
world.maps.importMap(file, map);
setup();
try{
world.maps.importMap(file, map);
setup();
}catch(Exception e){
ui.showError(Core.bundle.format("editor.errorimageload", Strings.parseException(e, false)));
Log.err(e);
}
});
}else{
world.maps.importMap(file, map);