refactored IAction.scheduleAfter and scheduleBefore to just after and before

This commit is contained in:
bigguy345 committed 2025-04-28 06:50:02 +03:00
1 parent 65fef1778e
commit 9b846c314d
2 files changed
+7 -3

No files matched your search

@@ -273,15 +273,19 @@ public class ScriptedActionManager implements IActionManager {
}
@Override
public void scheduleAfter(IAction after) {
public IAction after(IAction after) {
int idx = getIndex(this);
if (idx >= 0) scheduleActionAt(idx + 1, after);
return after;
}
@Override
public void scheduleBefore(IAction before) {
public IAction before(IAction before) {
int idx = getIndex(this);
if (idx >= 0) scheduleActionAt(Math.max(0, idx), before);
return before;
}
private final java.util.Map<String, Object> dataStore = new java.util.HashMap<>();