improved actions and conditions code,

added TrainLength condition,
added FreeStartBlock action
This commit is contained in:
Stephan Richter
2020-11-01 17:35:42 +01:00
parent a89d522ea2
commit d40ea949be
14 changed files with 264 additions and 148 deletions

View File

@@ -70,11 +70,11 @@ public class DelayedAction extends Action {
return json;
}
public static DelayedAction load(JSONObject json) {
DelayedAction action = new DelayedAction();
action.delay = json.getInt(DELAY);
if (json.has(ACTIONS)) action.actions = ActionList.load(json.getJSONArray(ACTIONS));
return action;
public DelayedAction load(JSONObject json) {
super.load(json);
delay = json.getInt(DELAY);
if (json.has(ACTIONS)) actions = ActionList.load(json.getJSONArray(ACTIONS));
return this;
}
@Override