Revamped before() and after() chaining of unscheduled IActions

This commit is contained in:
bigguy345 committed 2025-07-05 22:50:38 +03:00
1 parent f100fb0ab1
commit 253bfd7e17
3 files changed
+87 -68

No files matched your search

@@ -116,14 +116,13 @@ public class ActionQueue implements IActionQueue {
act.isScheduled = true;
if (!isParallel && act.unscheduledBefore != null)
act.scheduleAllBefore(queue);
if (!isParallel && act.unscheduledList != null) {
act.unscheduledList.scheduleAll(this).forEach((act1) -> act1.unscheduledList = null).kill();
return action;
}
queue.addLast(action);
if (!isParallel && act.unscheduledAfter != null)
act.scheduleAllAfter(queue);
return action;
}
@@ -183,6 +182,7 @@ public class ActionQueue implements IActionQueue {
queue.clear();
queue.addAll(tmp);
}
((Action) action).queue = this;
((Action) action).isScheduled = true;
return action;
}