public static void fillDefault(ActionRegistry registry) { registry.declaration(CoreActionNames.TRAVEL_IN_WORLD) .setParams(Type.STRING) .setDescription("Sets the task context to a particular world. Every nodes in current result will be switch ot new world.") .setFactory(new ActionFactory() { @Override public Action create(Object[] params) { .setParams(Type.STRING) .setDescription("Switches the time of the task context, i.e. travels the task context in time. Every nodes in current result will be switch ot new time.") .setFactory(new ActionFactory() { @Override public Action create(Object[] params) { .setParams(Type.STRING) .setDescription("Stores the task result as a global variable in the task context and starts a new scope (for sub tasks).") .setFactory(new ActionFactory() { @Override public Action create(Object[] params) { .setParams(Type.STRING) .setDescription("Stores the task result as a local variable in the task context and starts a new scope (for sub tasks).") .setFactory(new ActionFactory() { @Override public Action create(Object[] params) { .setParams(Type.STRING) .setDescription("Stores the task result as a global variable in the task context and starts a new scope (for sub tasks).") .setFactory(new ActionFactory() { @Override
static Action loadAction(final ActionRegistry registry, final String actionName, final String[] params, final Map<Integer, Task> contextTasks) { final ActionDeclaration declaration = registry.declaration(actionName); if (declaration == null || declaration.factory() == null) { final String[] varargs = params; return new ActionNamed(actionName, varargs); } else { final ActionFactory factory = declaration.factory(); final byte[] declaredParams = declaration.params(); if (declaredParams != null && params != null) { int resultSize = declaredParams.length;