I guess everything is unsafe now
This commit is contained in:
@@ -174,21 +174,12 @@ public class ModsDialog extends BaseDialog{
|
|||||||
dialog.hide();
|
dialog.hide();
|
||||||
|
|
||||||
platform.showMultiFileChooser(file -> {
|
platform.showMultiFileChooser(file -> {
|
||||||
Runnable go = () -> {
|
try{
|
||||||
try{
|
mods.importMod(file);
|
||||||
mods.importMod(file);
|
setup();
|
||||||
setup();
|
}catch(IOException e){
|
||||||
}catch(IOException e){
|
ui.showException(e);
|
||||||
ui.showException(e);
|
Log.err(e);
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
//show unsafe jar file warning
|
|
||||||
if(file.extEquals("jar")){
|
|
||||||
ui.showConfirm("@warning", "@mod.jarwarn", go);
|
|
||||||
}else{
|
|
||||||
go.run();
|
|
||||||
}
|
}
|
||||||
}, "zip", "jar");
|
}, "zip", "jar");
|
||||||
}).margin(12f);
|
}).margin(12f);
|
||||||
@@ -529,10 +520,7 @@ public class ModsDialog extends BaseDialog{
|
|||||||
|
|
||||||
private void githubImportMod(String repo, boolean isJava){
|
private void githubImportMod(String repo, boolean isJava){
|
||||||
if(isJava){
|
if(isJava){
|
||||||
ui.showConfirm("@warning", "@mod.jarwarn", () -> {
|
githubImportJavaMod(repo);
|
||||||
ui.loadfrag.show();
|
|
||||||
githubImportJavaMod(repo);
|
|
||||||
});
|
|
||||||
}else{
|
}else{
|
||||||
ui.loadfrag.show();
|
ui.loadfrag.show();
|
||||||
Core.net.httpGet(ghApi + "/repos/" + repo, res -> {
|
Core.net.httpGet(ghApi + "/repos/" + repo, res -> {
|
||||||
|
|||||||
@@ -324,7 +324,7 @@ public class MassDriver extends Block{
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected boolean shooterValid(Building other){
|
protected boolean shooterValid(Building other){
|
||||||
return other instanceof MassDriverBuild entity && other.consValid() && entity.block == block && entity.link == pos() && within(other, range);
|
return other instanceof MassDriverBuild entity && other.isValid() && other.consValid() && entity.block == block && entity.link == pos() && within(other, range);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean linkValid(){
|
protected boolean linkValid(){
|
||||||
|
|||||||
@@ -184,6 +184,7 @@ public class PayloadMassDriver extends PayloadBlock{
|
|||||||
if(current != null &&
|
if(current != null &&
|
||||||
!(
|
!(
|
||||||
current instanceof PayloadDriverBuild entity &&
|
current instanceof PayloadDriverBuild entity &&
|
||||||
|
current.isValid() &&
|
||||||
entity.consValid() && entity.block == block &&
|
entity.consValid() && entity.block == block &&
|
||||||
entity.link == pos() && within(current, range)
|
entity.link == pos() && within(current, range)
|
||||||
)){
|
)){
|
||||||
|
|||||||
Reference in New Issue
Block a user