minor bugfix. next step: implementing the preserveNextRoute action.
Must work in the following conditions: - called from route.setupActions - called from route.startActions - called from route.contactActions - called from autopilot after reaching route.endBlock
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>de.srsoftware</groupId>
|
||||
<artifactId>web4rail</artifactId>
|
||||
<version>1.3.69</version>
|
||||
<version>1.3.70</version>
|
||||
<name>Web4Rail</name>
|
||||
<packaging>jar</packaging>
|
||||
<description>Java Model Railway Control</description>
|
||||
|
||||
@@ -30,7 +30,7 @@ public class PreserveRoute extends Action {
|
||||
return false; // train is expected to wait in next block.
|
||||
}
|
||||
|
||||
train.reserveNext();
|
||||
train.reserveRouteAfter(route);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -715,10 +715,10 @@ public class Train extends BaseClass implements Comparable<Train> {
|
||||
return tags().iterator();
|
||||
}
|
||||
|
||||
public void reserveNext() {
|
||||
LOG.debug("{}.reserveNext()",this);
|
||||
public void reserveRouteAfter(Route r) {
|
||||
LOG.debug("reserveRouteAfter({})",r);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This turns the train as if it went through a loop. Example:
|
||||
* before: CabCar→ MiddleCar→ Loco→
|
||||
@@ -886,6 +886,7 @@ public class Train extends BaseClass implements Comparable<Train> {
|
||||
if (trace.contains(tile)) stuckTrace.add(tile);
|
||||
}
|
||||
route.reset();
|
||||
route = null;
|
||||
}
|
||||
return properties();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user