bitbrain / beehave

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

Fix 4.2 Debugger Visuals #345

Closed Snaiel closed 2 months ago

Snaiel commented 2 months ago

Addressed issues

Description

Fixes the debugger visuals for 4.2.

I renamed

to

respectively. Then created

for the 4.2+ version

This was done because the changes are big and there's a good possibility that there will be more changes to GraphNode and GraphEdit in the future that doing checks in the same file to support both versions seems like it'd be too messy. Now, the old files just have to worry about versions before 4.2 and the new files can deal with 4.2 and up.

The engine version is checked in the debugger tab to load the correct graph edit file and same in the plugin file to load the correct frames file. The graph edit files load their corresponding graph node files.

You can better see the changes made to get the visuals to work here:

https://github.com/Snaiel/Godot4ThirdPersonCombatPrototype/compare/4d340b63454f712886856b1ef9fd22795a74fe54...0f44daab6c9917b1bca4b8b37894cda463fccb29

I also removed the checks for the engine version (checking if a method exists) in the old and new files since they're now only used in one version.

https://github.com/bitbrain/beehave/assets/56014779/cc7f6724-fd76-45b7-b977-43ac06c15169

Snaiel commented 2 months ago

This makes debugger_test.gd fail. Looking into

line 71: Godot Runtime Error !
    'at: _ready (res://addons/beehave/debug/new_graph_node.gd:71)'
Error: 'Trying to assign value of type 'FontFile' to a variable of type 'FontVariation'.'
Snaiel commented 2 months ago

Also orphans found in debugger_test.gd

bitbrain commented 2 months ago

This bothered me for so long but never had the time to look into it properly. Thank you so much!