From 39f504f42c83fd24b015fd5f04c630035d583c4f Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Fri, 16 Dec 2022 14:06:46 +0100 Subject: [PATCH] Make use of GDREGISTER_* --- register_types.cpp | 129 ++++++++++++++++++++++----------------------- 1 file changed, 64 insertions(+), 65 deletions(-) diff --git a/register_types.cpp b/register_types.cpp index 9ed6ed3..65f0171 100644 --- a/register_types.cpp +++ b/register_types.cpp @@ -80,80 +80,79 @@ static LimboUtility *_limbo_utility = nullptr; void initialize_limboai_module(ModuleInitializationLevel p_level) { if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) { - ClassDB::register_class(); + GDREGISTER_CLASS(Blackboard); - ClassDB::register_class(); - ClassDB::register_class(); + GDREGISTER_CLASS(LimboState); + GDREGISTER_CLASS(LimboHSM); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); + GDREGISTER_ABSTRACT_CLASS(BTTask); + GDREGISTER_CLASS(BehaviorTree); + GDREGISTER_CLASS(BTPlayer); + GDREGISTER_CLASS(BTState); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); + GDREGISTER_CLASS(BTComposite); + GDREGISTER_CLASS(BTSequence); + GDREGISTER_CLASS(BTSelector); + GDREGISTER_CLASS(BTParallel); + GDREGISTER_CLASS(BTDynamicSequence); + GDREGISTER_CLASS(BTDynamicSelector); + GDREGISTER_CLASS(BTRandomSequence); + GDREGISTER_CLASS(BTRandomSelector); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); + GDREGISTER_CLASS(BTDecorator); + GDREGISTER_CLASS(BTInvert); + GDREGISTER_CLASS(BTAlwaysFail); + GDREGISTER_CLASS(BTAlwaysSucceed); + GDREGISTER_CLASS(BTDelay); + GDREGISTER_CLASS(BTRepeat); + GDREGISTER_CLASS(BTRepeatUntilFailure); + GDREGISTER_CLASS(BTRepeatUntilSuccess); + GDREGISTER_CLASS(BTRunLimit); + GDREGISTER_CLASS(BTTimeLimit); + GDREGISTER_CLASS(BTCooldown); + GDREGISTER_CLASS(BTProbability); + GDREGISTER_CLASS(BTForEach); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); + GDREGISTER_CLASS(BTAction); + GDREGISTER_CLASS(BTFail); + GDREGISTER_CLASS(BTWait); + GDREGISTER_CLASS(BTRandomWait); + GDREGISTER_CLASS(BTWaitTicks); + GDREGISTER_CLASS(BTNewScope); + GDREGISTER_CLASS(BTSubtree); + GDREGISTER_CLASS(BTConsolePrint); - ClassDB::register_class(); + GDREGISTER_CLASS(BTCondition); - ClassDB::register_abstract_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); + GDREGISTER_ABSTRACT_CLASS(BBParam); + GDREGISTER_CLASS(BBInt); + GDREGISTER_CLASS(BBBool); + GDREGISTER_CLASS(BBFloat); + GDREGISTER_CLASS(BBString); + GDREGISTER_CLASS(BBVector2); + GDREGISTER_CLASS(BBRect2); + GDREGISTER_CLASS(BBVector3); + GDREGISTER_CLASS(BBTransform2D); + GDREGISTER_CLASS(BBPlane); + GDREGISTER_CLASS(BBQuat); + GDREGISTER_CLASS(BBAabb); + GDREGISTER_CLASS(BBBasis); + GDREGISTER_CLASS(BBTransform); + GDREGISTER_CLASS(BBColor); + GDREGISTER_CLASS(BBNode); + GDREGISTER_CLASS(BBDictionary); + GDREGISTER_CLASS(BBArray); + GDREGISTER_CLASS(BBByteArray); + GDREGISTER_CLASS(BBIntArray); + GDREGISTER_CLASS(BBRealArray); + GDREGISTER_CLASS(BBColorArray); + GDREGISTER_CLASS(BBStringArray); + GDREGISTER_CLASS(BBVector2Array); + GDREGISTER_CLASS(BBVector3Array); + GDREGISTER_CLASS(BBVariant); _limbo_utility = memnew(LimboUtility); - ClassDB::register_class(); + GDREGISTER_CLASS(LimboUtility); LimboStringNames::create(); }