overhauled brake time processor
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user