preventing new route reservation, when train already has route
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.5.7</version>
|
||||
<version>1.5.8</version>
|
||||
<name>Web4Rail</name>
|
||||
<packaging>jar</packaging>
|
||||
<description>Java Model Railway Control</description>
|
||||
|
||||
@@ -985,6 +985,11 @@ public class Train extends BaseClass implements Comparable<Train> {
|
||||
if (isSet(currentBlock)) plan.place(currentBlock);
|
||||
}
|
||||
|
||||
x if (isSet(route)) {
|
||||
LOG.debug("Train already on route {}",route);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (isSet(nextPreparedRoute)) {
|
||||
LOG.debug("starting nextPreparedRoute: {}",nextPreparedRoute);
|
||||
if (nextPreparedRoute.startNow()) {
|
||||
|
||||
Reference in New Issue
Block a user