# Conflicts:

#	core/src/mindustry/mod/ClassMap.java
This commit is contained in:
Anuken
2021-06-15 19:29:12 -04:00
parent ac111677c0
commit eed91eaaa0
72 changed files with 820 additions and 704 deletions

View File

@@ -174,21 +174,12 @@ public class ModsDialog extends BaseDialog{
dialog.hide();
platform.showMultiFileChooser(file -> {
Runnable go = () -> {
try{
mods.importMod(file);
setup();
}catch(IOException e){
ui.showException(e);
e.printStackTrace();
}
};
//show unsafe jar file warning
if(file.extEquals("jar")){
ui.showConfirm("@warning", "@mod.jarwarn", go);
}else{
go.run();
try{
mods.importMod(file);
setup();
}catch(IOException e){
ui.showException(e);
Log.err(e);
}
}, "zip", "jar");
}).margin(12f);
@@ -529,10 +520,7 @@ public class ModsDialog extends BaseDialog{
private void githubImportMod(String repo, boolean isJava){
if(isJava){
ui.showConfirm("@warning", "@mod.jarwarn", () -> {
ui.loadfrag.show();
githubImportJavaMod(repo);
});
githubImportJavaMod(repo);
}else{
ui.loadfrag.show();
Core.net.httpGet(ghApi + "/repos/" + repo, res -> {