Skip to content

Move Blackboard initialization to export line#122

Closed
Werninator wants to merge 2 commits intobitbrain:godot-4.xfrom
Werninator:move_blackboard_init
Closed

Move Blackboard initialization to export line#122
Werninator wants to merge 2 commits intobitbrain:godot-4.xfrom
Werninator:move_blackboard_init

Conversation

@Werninator
Copy link

Description

If BeehaveTree.enabled = false, the blackboard property will always be null if not otherwise assigned

This PR is there to allow editing a blackboard even if the tree is deactivated - reducing the need to add ifs outside the BeehaveTree itself. Also, correct me if I'm wrong - if the Tree starts out disabled, will it ever have a Blackboard (if not assigned)?

If BeehaveTree is deactivated, the blackboard property will always be
null. This is to allow editing a blackboard even if the tree is
deactivated
@bitbrain
Copy link
Owner

Could you also add a test here? https://github.com/bitbrain/beehave/blob/godot-4.x/test/beehave_tree_test.gd

@bitbrain bitbrain added the 🟡 changes requested Changes have been requested from the contributor. label Feb 11, 2023
@Werninator
Copy link
Author

I added a test to beehave_tree_test.gd and found out it that my solution would introduce orphans to the BeehaveTree. Also, Blackboard seems to be available after enabling - to answer my question above.

Closing this as making blackboard available even for disabled trees seems more a hustle to just leave it and wrap access to the blackboard with if-checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🟡 changes requested Changes have been requested from the contributor.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants