We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 04f435d commit 2584aecCopy full SHA for 2584aec
btpy/__init__.py
@@ -32,6 +32,10 @@ class AsyncActionNode(StatefulActionNode):
32
this method can return a final `NodeStatus` value to indicate its exit
33
condition.
34
35
+ Optionally, subclasses can override the `on_halted()` method which is called
36
+ when the tree halts. The default implementation does nothing. The `run()`
37
+ method will never be called again after a halt.
38
+
39
Note:
40
It is the responsibility of the action author to not block the main
41
behavior tree loop with long-running tasks. `yield` calls should be
@@ -64,3 +68,7 @@ def on_running(self) -> NodeStatus:
64
68
# Otherwise, just assume the action finished successfully.
65
69
else:
66
70
return NodeStatus.SUCCESS
71
72
+ def on_halted(self):
73
+ # Default action: do nothing
74
+ pass
0 commit comments