overhauled brake time processor

This commit is contained in:
Stephan Richter
2021-01-02 17:58:21 +01:00
parent 7b7980cc98
commit a74070ea80
7 changed files with 152 additions and 35 deletions

View File

@@ -34,6 +34,14 @@ public class ConditionalAction extends ActionList {
return super.fire(context.clone()); // actions, that happen within the conditional action list must not modify the global context.
}
@Override
public Integer getSpeed(Context context) {
for (Condition condition : conditions) {
if (!condition.fulfilledBy(context)) return null;
}
return super.getSpeed(context);
}
@Override
public JSONObject json() {
JSONObject json = super.json();