bugfixes, added new Condition AutopilotActive, extended StopAutopilot action to StartStopAutopilot, implemented ActionList export

This commit is contained in:
Stephan Richter
2020-12-04 22:45:30 +01:00
parent 3eea978c31
commit 8901973808
11 changed files with 108 additions and 33 deletions

View File

@@ -0,0 +1,15 @@
package de.srsoftware.web4rail.conditions;
public class AutopilotActive extends Condition {
@Override
public boolean fulfilledBy(Context context) {
if (isNull(context.train())) return false;
return context.train().usesAutopilot() != inverted;
}
@Override
public String toString() {
return t(inverted ? "autopilot inactive for train":"autopilot active for train") ;
}
}