Pathfinding bugfixes / Logic dialog hiding "unfixed"

This commit is contained in:
Anuken
2023-08-09 13:05:19 -04:00
parent 19f34c14a0
commit f1172d45eb
5 changed files with 17 additions and 13 deletions

View File

@@ -220,6 +220,14 @@ public class LStatements{
row(s);
fields(s, "rotation", p3, v -> p3 = v);
}
//TODO
/*
case character -> {
fields(s, "x", x, v -> x = v);
fields(s, "y", y, v -> y = v);
row(s);
fields(s, "char", p1, v -> p1 = v);
}*/
}
}).expand().left();
}

View File

@@ -228,20 +228,11 @@ public class LogicDialog extends BaseDialog{
}
public void show(String code, LExecutor executor, boolean privileged, Cons<String> modified){
show(code, executor, privileged, null, modified);
}
public void show(String code, LExecutor executor, boolean privileged, @Nullable Building build, Cons<String> modified){
this.executor = executor;
this.privileged = privileged;
canvas.statements.clearChildren();
canvas.rebuild();
canvas.privileged = privileged;
update(() -> {
if(build != null && (!build.isValid() || !state.isGame())){
hide();
}
});
try{
canvas.load(code);
}catch(Throwable t){