Bugfixes
This commit is contained in:
@@ -21,9 +21,11 @@ public class LogicDialog extends BaseDialog{
|
|||||||
|
|
||||||
canvas = new LCanvas();
|
canvas = new LCanvas();
|
||||||
shouldPause = true;
|
shouldPause = true;
|
||||||
addCloseButton();
|
|
||||||
|
|
||||||
buttons.getCells().first().width(170f);
|
addCloseListener();
|
||||||
|
|
||||||
|
buttons.defaults().size(160f, 64f);
|
||||||
|
buttons.button("@back", Icon.left, this::hide);
|
||||||
|
|
||||||
buttons.button("@edit", Icon.edit, () -> {
|
buttons.button("@edit", Icon.edit, () -> {
|
||||||
BaseDialog dialog = new BaseDialog("@editor.export");
|
BaseDialog dialog = new BaseDialog("@editor.export");
|
||||||
@@ -51,7 +53,7 @@ public class LogicDialog extends BaseDialog{
|
|||||||
|
|
||||||
dialog.addCloseButton();
|
dialog.addCloseButton();
|
||||||
dialog.show();
|
dialog.show();
|
||||||
}).width(170f);
|
});
|
||||||
|
|
||||||
buttons.button("@add", Icon.add, () -> {
|
buttons.button("@add", Icon.add, () -> {
|
||||||
BaseDialog dialog = new BaseDialog("@add");
|
BaseDialog dialog = new BaseDialog("@add");
|
||||||
@@ -75,7 +77,7 @@ public class LogicDialog extends BaseDialog{
|
|||||||
});
|
});
|
||||||
dialog.addCloseButton();
|
dialog.addCloseButton();
|
||||||
dialog.show();
|
dialog.show();
|
||||||
}).width(170f).disabled(t -> canvas.statements.getChildren().size >= LExecutor.maxInstructions);
|
}).disabled(t -> canvas.statements.getChildren().size >= LExecutor.maxInstructions);
|
||||||
|
|
||||||
add(canvas).grow();
|
add(canvas).grow();
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ public class Sector{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String name(){
|
public String name(){
|
||||||
if(preset != null) return preset.localizedName;
|
if(preset != null && info.name == null) return preset.localizedName;
|
||||||
return info.name == null ? id + "" : info.name;
|
return info.name == null ? id + "" : info.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
if(to.near().contains(launchSector)) return launchSector;
|
if(to.near().contains(launchSector)) return launchSector;
|
||||||
|
|
||||||
Sector launchFrom = launchSector;
|
Sector launchFrom = launchSector;
|
||||||
if(launchFrom == null){
|
if(launchFrom == null || (to.preset == null && !to.near().contains(launchSector))){
|
||||||
//TODO pick one with the most resources
|
//TODO pick one with the most resources
|
||||||
launchFrom = to.near().find(Sector::hasBase);
|
launchFrom = to.near().find(Sector::hasBase);
|
||||||
if(launchFrom == null && to.preset != null){
|
if(launchFrom == null && to.preset != null){
|
||||||
|
|||||||
Reference in New Issue
Block a user