mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-22 12:38:05 +07:00
formatting
This commit is contained in:
parent
c458c77322
commit
a9f07f3603
@ -460,24 +460,24 @@ public class Mods implements Loadable{
|
||||
eachEnabled(mod -> {
|
||||
if(mod.root.child("scripts").exists()){
|
||||
content.setCurrentMod(mod);
|
||||
Fi main = mod.root.child("scripts").child("main.js");
|
||||
if(main.exists() && !main.isDirectory()){
|
||||
try{
|
||||
if(scripts == null){
|
||||
scripts = platform.createScripts();
|
||||
}
|
||||
scripts.run(mod, main);
|
||||
}catch(Throwable e){
|
||||
Core.app.post(() -> {
|
||||
Log.err("Error loading main script {0} for mod {1}.", main.name(), mod.meta.name);
|
||||
e.printStackTrace();
|
||||
});
|
||||
}
|
||||
}else{
|
||||
Core.app.post(() -> {
|
||||
Log.err("No main.js found for mod {0}.", mod.meta.name);
|
||||
});
|
||||
}
|
||||
Fi main = mod.root.child("scripts").child("main.js");
|
||||
if(main.exists() && !main.isDirectory()){
|
||||
try{
|
||||
if(scripts == null){
|
||||
scripts = platform.createScripts();
|
||||
}
|
||||
scripts.run(mod, main);
|
||||
}catch(Throwable e){
|
||||
Core.app.post(() -> {
|
||||
Log.err("Error loading main script {0} for mod {1}.", main.name(), mod.meta.name);
|
||||
e.printStackTrace();
|
||||
});
|
||||
}
|
||||
}else{
|
||||
Core.app.post(() -> {
|
||||
Log.err("No main.js found for mod {0}.", mod.meta.name);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}finally{
|
||||
|
Loading…
Reference in New Issue
Block a user