Started clean re-implementation of

- reserving route
- preparing route
- locking route

New implementation now properly handles stop event from user.

Next things to implement:

- tracing train upon contact activation, taking care of:
    - causing contact
    - train's last position
    - route
    - plan.freeBehindTrain
- finish event, keeping brake processor in mind
This commit is contained in:
Stephan Richter
2021-03-13 20:15:51 +01:00
parent 9939d8d630
commit 2647b4c43d
20 changed files with 795 additions and 404 deletions

View File

@@ -159,7 +159,7 @@ public abstract class Turnout extends Tile implements Device{
}
public Reply state(State newState) {
if (is(Status.LOCKED,Status.OCCUPIED) && newState != state) return new Reply(415, t("{} locked by {}!",this,train));
if (is(Status.LOCKED,Status.OCCUPIED) && newState != state) return new Reply(415, t("{} locked by {}!",this,train()));
if (address == 0) {
state = newState;
plan.place(this);