Misc bugfixes
This commit is contained in:
@@ -180,6 +180,8 @@ public class SettingsMenuDialog extends BaseDialog{
|
||||
t.button("@data.import", Icon.download, style, () -> ui.showConfirm("@confirm", "@data.import.confirm", () -> platform.showFileChooser(true, "zip", file -> {
|
||||
try{
|
||||
importData(file);
|
||||
control.saves.resetSave();
|
||||
state = new GameState();
|
||||
Core.app.exit();
|
||||
}catch(IllegalArgumentException e){
|
||||
ui.showErrorMessage("@data.invalid");
|
||||
|
||||
@@ -405,17 +405,16 @@ public class PowerNode extends PowerBlock{
|
||||
}
|
||||
|
||||
if(this == other){ //double tapped
|
||||
if(other.power.links.size == 0 || Core.input.shift()){ //find links
|
||||
int[] total = {0};
|
||||
if(other.power.links.size == 0){ //find links
|
||||
Seq<Point2> points = new Seq<>();
|
||||
getPotentialLinks(tile, team, link -> {
|
||||
if(!insulated(this, link) && total[0]++ < maxNodes){
|
||||
configure(link.pos());
|
||||
if(!insulated(this, link) && points.size < maxNodes){
|
||||
points.add(new Point2(link.tileX() - tile.x, link.tileY() - tile.y));
|
||||
}
|
||||
});
|
||||
configure(points.toArray(Point2.class));
|
||||
}else{ //clear links
|
||||
while(power.links.size > 0){
|
||||
configure(power.links.get(0));
|
||||
}
|
||||
configure(new Point2[0]);
|
||||
}
|
||||
deselect();
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user