ThePat02 / BehaviourToolkit

A collection of tools for AI Behaviour in the Godot 4 Game Engine!
MIT License
368 stars 15 forks source link

add: Configuration Warnings and Asserts #46

Closed ThePat02 closed 9 months ago

ThePat02 commented 10 months ago

Add configuration warnings and asserts to the FSM and BT nodes.

ThePat02 commented 10 months ago

Problem: Reset buttons on exported properties are randomly disappearing. Might be related to setter on exported properties with the type of node?

ThePat02 commented 10 months ago

Basically you need to reload the scene before getting to reset any properties.

ThePat02 commented 10 months ago

Bug not related. #48

ThePat02 commented 9 months ago

I implemented some basic warnings for both FSM and BT. @SirPigeonz Could you just check your project if any weird warnings show up on working trees? After that it should be ready to merge.

SirPigeonz commented 9 months ago

I implemented some basic warnings for both FSM and BT. @SirPigeonz Could you just check your project if any weird warnings show up on working trees? After that it should be ready to merge.

Seems to work fine :)

SirPigeonz commented 9 months ago

@ThePat02 Note. We just need to point in docs that if you extend nodes, you should add @tool in your script if you want warnings. Also, extended nodes in the demo don't have updated scripts with @tool.

ThePat02 commented 9 months ago

@ThePat02

Note. We just need to point in docs that if you extend nodes, you should add @tool in your script if you want warnings.

Also, extended nodes in the demo don't have updated scripts with @tool.

Good point. Also adding tool keyword to the templates. I am not sure if warnings work even without tool on scripts extending a tool script? Can't test it right now, but I remember fiddling around with this earlier.

ThePat02 commented 9 months ago

Note. We just need to point in docs that if you extend nodes, you should add @tool in your script if you want warnings. Also, extended nodes in the demo don't have updated scripts with @tool.

Here are warnings working without the @tool keyword. This weirdly only applies to newly added nodes. Nodes from the example scene do not work... image image Adding new ones enables the warnings again. image

@SirPigeonz Any idea what causes this weird behaviour?

SirPigeonz commented 9 months ago

@SirPigeonz Any idea what causes this weird behaviour?

I have no idea :D

ThePat02 commented 9 months ago

I have no idea :D

lol same

ThePat02 commented 9 months ago

Adding asserts is postponed until #47 is implemented