working on route actions:

start block of route should only be freed, if corresponding action is fired.
  however, train should not be available from previous start block after route has finished.
This commit is contained in:
Stephan Richter
2020-11-03 23:28:23 +01:00
parent a2cb3d813e
commit 596317049c
14 changed files with 183 additions and 123 deletions

View File

@@ -2,11 +2,14 @@ package de.srsoftware.web4rail.actions;
import java.io.IOException;
import de.srsoftware.web4rail.Route;
public class FinishRoute extends Action {
@Override
public boolean fire(Context context) throws IOException {
context.route.finish();
Route route = context.route;
if (route != null) route.finish();
return true;
}
}