bitbrain / beehave

🐝 behavior tree AI for Godot Engine
https://bitbra.in/beehave
MIT License
1.86k stars 116 forks source link

:bug: ensure blackboard is always available #262

Closed bitbrain closed 9 months ago

bitbrain commented 9 months ago

There are cases where the BeehaveTree may be used already but the tree may not be initialised yet. This pull request ensures that a blackboard will always be available at all times. So errors like these should not happen any longer:

line 178: Godot Runtime Error !
    'at: BeehaveTree.tick (res://addons/beehave/nodes/beehave_tree.gd:178)'
Error: 'Invalid call. Nonexistent function 'set_value' in base 'Nil'.'

Also added a test to verify that.