bugfixes
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.2.37</version>
|
||||
<version>1.2.38</version>
|
||||
<name>Web4Rail</name>
|
||||
<packaging>jar</packaging>
|
||||
<description>Java Model Railway Control</description>
|
||||
|
||||
@@ -7,6 +7,7 @@ ActivateRoute : Route aktivieren
|
||||
add : hinzufügen
|
||||
Added {} : {} hinzugefügt
|
||||
add action : Aktion hinzufügen
|
||||
Add action to action list : Aktion zur Liste hinzufügen
|
||||
add car\: : Waggon hinzufügen:
|
||||
Add condition : Bedingung hinzufügen
|
||||
add locomotive\: : Lok hinzufügen:
|
||||
|
||||
@@ -406,6 +406,10 @@ public class Route extends BaseClass {
|
||||
return win;
|
||||
}
|
||||
|
||||
public Context context() {
|
||||
return context.clone();
|
||||
}
|
||||
|
||||
public Block endBlock() {
|
||||
return endBlock;
|
||||
}
|
||||
|
||||
@@ -274,6 +274,7 @@ public abstract class Block extends StretchableTile{
|
||||
Id trainId = Id.from(params,Train.class.getSimpleName());
|
||||
if (trainId.equals(0)) { // TODO: this is rubbish
|
||||
if (isSet(train)) train.dropTrace();
|
||||
train.set(null);
|
||||
train = null;
|
||||
} else {
|
||||
Train newTrain = Train.get(trainId);
|
||||
|
||||
@@ -75,12 +75,15 @@ public class Contact extends Tile{
|
||||
LOG.debug("{} activated.",this);
|
||||
state = true;
|
||||
if (isSet(timer)) timer.abort();
|
||||
Context context = null;
|
||||
if (isSet(route)) {
|
||||
context = route.context();
|
||||
route.contact(this);
|
||||
} else if (getClass() != Contact.class) {
|
||||
plan.warn(this);
|
||||
}
|
||||
actions.fire(new Context(this));
|
||||
if (isNull(context)) context = new Context(this);
|
||||
actions.fire(context);
|
||||
stream();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user