bugfixes
This commit is contained in:
@@ -245,7 +245,7 @@ public class Plan extends BaseClass{
|
||||
Vector<Route> routes = new Vector<Route>();
|
||||
for (Block block : blocks) {
|
||||
for (Connector con : block.startPoints()) {
|
||||
routes.addAll(follow(new Route().begin(block,con.from.inverse()),con));
|
||||
routes.addAll(follow(new Route().begin(block,con.from),con));
|
||||
}
|
||||
}
|
||||
for (Tile tile : tiles.values()) tile.routes().clear();
|
||||
|
||||
@@ -290,7 +290,7 @@ public class Route extends BaseClass implements Comparable<Route>{
|
||||
path = new Vector<Tile>();
|
||||
turnouts = new HashMap<>();
|
||||
startBlock = block;
|
||||
startDirection = from;
|
||||
startDirection = from.inverse();
|
||||
path.add(block);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -598,9 +598,13 @@ public class Train extends BaseClass implements Comparable<Train> {
|
||||
}
|
||||
|
||||
public Object quitAutopilot() {
|
||||
if (isSet(nextRoute)) {
|
||||
nextRoute.reset();
|
||||
nextRoute = null;
|
||||
}
|
||||
if (isSet(autopilot)) {
|
||||
autopilot.stop = true;
|
||||
autopilot = null;
|
||||
autopilot = null;
|
||||
return t("{} stopping at next block.",this);
|
||||
} else return t("autopilot not active.");
|
||||
}
|
||||
@@ -615,7 +619,7 @@ public class Train extends BaseClass implements Comparable<Train> {
|
||||
|
||||
boolean error = !nextRoute.lockIgnoring(route);
|
||||
error = error || !nextRoute.setTurnouts();
|
||||
error = error || !route.fireSetupActions(context);
|
||||
error = error || !nextRoute.fireSetupActions(context);
|
||||
|
||||
if (error) {
|
||||
nextRoute.reset(); // may unlock tiles belonging to the current route.
|
||||
|
||||
Reference in New Issue
Block a user