added new action ReactivateContact
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -4,7 +4,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>de.srsoftware</groupId>
|
<groupId>de.srsoftware</groupId>
|
||||||
<artifactId>web4rail</artifactId>
|
<artifactId>web4rail</artifactId>
|
||||||
<version>1.2.52</version>
|
<version>1.2.53</version>
|
||||||
<name>Web4Rail</name>
|
<name>Web4Rail</name>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<description>Java Model Railway Control</description>
|
<description>Java Model Railway Control</description>
|
||||||
|
|||||||
@@ -172,6 +172,7 @@ PushPullTrain : Wendezug
|
|||||||
Push-pull train : Wendezug
|
Push-pull train : Wendezug
|
||||||
quit autopilot : Autopilot beenden
|
quit autopilot : Autopilot beenden
|
||||||
{} reached it`s destination! : {} ist am Ziel angekommen!
|
{} reached it`s destination! : {} ist am Ziel angekommen!
|
||||||
|
ReactivateContact : Kontakt reaktivieren
|
||||||
Relay : Relais
|
Relay : Relais
|
||||||
Relays and Turnouts : Relais und Weichen
|
Relays and Turnouts : Relais und Weichen
|
||||||
Relay/Turnout : Relais/Weiche
|
Relay/Turnout : Relais/Weiche
|
||||||
|
|||||||
@@ -763,7 +763,10 @@ public class Route extends BaseClass {
|
|||||||
Window win = super.properties(preForm, formInputs, postForm);
|
Window win = super.properties(preForm, formInputs, postForm);
|
||||||
previewScript().addTo(win);
|
previewScript().addTo(win);
|
||||||
return win;
|
return win;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean reactivate(Contact contact) {
|
||||||
|
return triggeredContacts.remove(contact);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ public abstract class Action extends BaseClass {
|
|||||||
FinishRoute.class,
|
FinishRoute.class,
|
||||||
Loop.class,
|
Loop.class,
|
||||||
PreserveRoute.class,
|
PreserveRoute.class,
|
||||||
|
ReactivateContact.class,
|
||||||
SavePlan.class,
|
SavePlan.class,
|
||||||
SendCommand.class,
|
SendCommand.class,
|
||||||
SetContextTrain.class,
|
SetContextTrain.class,
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package de.srsoftware.web4rail.actions;
|
||||||
|
|
||||||
|
import de.srsoftware.web4rail.BaseClass;
|
||||||
|
|
||||||
|
public class ReactivateContact extends Action{
|
||||||
|
|
||||||
|
public ReactivateContact(BaseClass parent) {
|
||||||
|
super(parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean fire(Context context) {
|
||||||
|
if (isNull(context.contact())) return false;
|
||||||
|
if (isNull(context.route())) return false;
|
||||||
|
return context.route().reactivate(context.contact());
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user