# Conflicts:
# core/src/mindustry/mod/ClassMap.java
This commit is contained in:
@@ -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 -> {
|
||||
|
||||
Reference in New Issue
Block a user