bugfixes, added new Condition AutopilotActive, extended StopAutopilot action to StartStopAutopilot, implemented ActionList export
This commit is contained in:
@@ -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") ;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user