preventing new route reservation, when train already has route

This commit is contained in:
Stephan Richter
2021-06-26 14:43:19 +02:00
parent 80f31e2628
commit bb22f2a829
2 changed files with 6 additions and 1 deletions

View File

@@ -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>

View File

@@ -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()) {