Add BBParam missing types

This commit is contained in:
Serhii Snitsaruk 2024-01-19 17:05:01 +01:00
parent 881a32f92d
commit 33b455f8d9
15 changed files with 150 additions and 39 deletions

View File

@ -8,8 +8,8 @@ on:
- "README.md" - "README.md"
- "LICENSE" - "LICENSE"
- "**/*.png" - "**/*.png"
- "demo/*" - "demo/**"
- "doc/*" - "doc/**"
pull_request: pull_request:
branches: [ master ] branches: [ master ]
@ -17,8 +17,8 @@ on:
- "README.md" - "README.md"
- "LICENSE" - "LICENSE"
- "**/*.png" - "**/*.png"
- "demo/*" - "demo/**"
- "doc/*" - "doc/**"
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

View File

@ -0,0 +1,24 @@
/**
* bb_float32_array.h
* =============================================================================
* Copyright 2021-2024 Serhii Snitsaruk
*
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
* =============================================================================
*/
#ifndef BB_FLOAT32_ARRAY_H
#define BB_FLOAT32_ARRAY_H
#include "bb_param.h"
class BBFloat32Array : public BBParam {
GDCLASS(BBFloat32Array, BBParam);
protected:
virtual Variant::Type get_type() const override { return Variant::PACKED_FLOAT32_ARRAY; }
};
#endif // BB_FLOAT32_ARRAY_H

View File

@ -1,7 +1,7 @@
/** /**
* bb_float_array.h * bb_float64_array.h
* ============================================================================= * =============================================================================
* Copyright 2021-2023 Serhii Snitsaruk * Copyright 2021-2024 Serhii Snitsaruk
* *
* Use of this source code is governed by an MIT-style * Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
@ -9,16 +9,16 @@
* ============================================================================= * =============================================================================
*/ */
#ifndef BB_FLOAT_ARRAY_H #ifndef BB_FLOAT64_ARRAY_H
#define BB_FLOAT_ARRAY_H #define BB_FLOAT64_ARRAY_H
#include "bb_param.h" #include "bb_param.h"
class BBFloatArray : public BBParam { class BBFloat64Array : public BBParam {
GDCLASS(BBFloatArray, BBParam); GDCLASS(BBFloat64Array, BBParam);
protected: protected:
virtual Variant::Type get_type() const override { return Variant::PACKED_FLOAT64_ARRAY; } virtual Variant::Type get_type() const override { return Variant::PACKED_FLOAT64_ARRAY; }
}; };
#endif // BB_FLOAT_ARRAY_H #endif // BB_FLOAT64_ARRAY_H

View File

@ -0,0 +1,24 @@
/**
* bb_int32_array.h
* =============================================================================
* Copyright 2021-2024 Serhii Snitsaruk
*
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
* =============================================================================
*/
#ifndef BB_INT32_ARRAY_H
#define BB_INT32_ARRAY_H
#include "bb_param.h"
class BBInt32Array : public BBParam {
GDCLASS(BBInt32Array, BBParam);
protected:
virtual Variant::Type get_type() const override { return Variant::PACKED_INT32_ARRAY; }
};
#endif // BB_INT32_ARRAY_H

View File

@ -1,7 +1,7 @@
/** /**
* bb_int_array.h * bb_int64_array.h
* ============================================================================= * =============================================================================
* Copyright 2021-2023 Serhii Snitsaruk * Copyright 2021-2024 Serhii Snitsaruk
* *
* Use of this source code is governed by an MIT-style * Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
@ -9,16 +9,16 @@
* ============================================================================= * =============================================================================
*/ */
#ifndef BB_INT_ARRAY_H #ifndef BB_INT64_ARRAY_H
#define BB_INT_ARRAY_H #define BB_INT64_ARRAY_H
#include "bb_param.h" #include "bb_param.h"
class BBIntArray : public BBParam { class BBInt64Array : public BBParam {
GDCLASS(BBIntArray, BBParam); GDCLASS(BBInt64Array, BBParam);
protected: protected:
virtual Variant::Type get_type() const override { return Variant::PACKED_INT64_ARRAY; } virtual Variant::Type get_type() const override { return Variant::PACKED_INT64_ARRAY; }
}; };
#endif // BB_INT_ARRAY_H #endif // BB_INT64_ARRAY_H

View File

@ -1,7 +1,7 @@
/** /**
* bb_param.h * bb_param.h
* ============================================================================= * =============================================================================
* Copyright 2021-2023 Serhii Snitsaruk * Copyright 2021-2024 Serhii Snitsaruk
* *
* Use of this source code is governed by an MIT-style * Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at

View File

@ -0,0 +1,24 @@
/**
* bb_projection.h
* =============================================================================
* Copyright 2021-2024 Serhii Snitsaruk
*
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
* =============================================================================
*/
#ifndef BB_PROJECTION_H
#define BB_PROJECTION_H
#include "bb_param.h"
class BBProjection : public BBParam {
GDCLASS(BBProjection, BBParam);
protected:
virtual Variant::Type get_type() const override { return Variant::PROJECTION; }
};
#endif // BB_PROJECTION_H

View File

@ -28,12 +28,15 @@ def get_doc_classes():
"BBColorArray", "BBColorArray",
"BBDictionary", "BBDictionary",
"BBFloat", "BBFloat",
"BBFloatArray", "BBFloat32Array",
"BBFloat64Array",
"BBInt", "BBInt",
"BBIntArray", "BBInt32Array",
"BBInt64Array",
"BBNode", "BBNode",
"BBParam", "BBParam",
"BBPlane", "BBPlane",
"BBProjection",
"BBQuat", "BBQuat",
"BBQuaternion", "BBQuaternion",
"BBRealArray", "BBRealArray",

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBFloat32Array" inherits="BBParam" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
PackedFloat32Array-type parameter for [BehaviorTree] tasks. See [BBParam].
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
</class>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBFloat64Array" inherits="BBParam" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
PackedFloat64Array-type parameter for [BehaviorTree] tasks. See [BBParam].
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
</class>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBInt32Array" inherits="BBParam" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
PackedInt32Array-type parameter for [BehaviorTree] tasks. See [BBParam].
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
</class>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBInt64Array" inherits="BBParam" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
PackedInt64Array-type parameter for [BehaviorTree] tasks. See [BBParam].
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
</class>

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBIntArray" inherits="BBParam" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
IntArray-type parameter for [BehaviorTree] tasks. See [BBParam].
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
</class>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<class name="BBFloatArray" inherits="BBParam" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd"> <class name="BBProjection" inherits="BBParam" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description> <brief_description>
FloatArray-type parameter for [BehaviorTree] tasks. See [BBParam]. Projection-type parameter for [BehaviorTree] tasks. See [BBParam].
</brief_description> </brief_description>
<description> <description>
</description> </description>

View File

@ -1,7 +1,7 @@
/** /**
* register_types.cpp * register_types.cpp
* ============================================================================= * =============================================================================
* Copyright 2021-2023 Serhii Snitsaruk * Copyright 2021-2024 Serhii Snitsaruk
* *
* Use of this source code is governed by an MIT-style * Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
@ -20,12 +20,15 @@
#include "blackboard/bb_param/bb_color_array.h" #include "blackboard/bb_param/bb_color_array.h"
#include "blackboard/bb_param/bb_dictionary.h" #include "blackboard/bb_param/bb_dictionary.h"
#include "blackboard/bb_param/bb_float.h" #include "blackboard/bb_param/bb_float.h"
#include "blackboard/bb_param/bb_float_array.h" #include "blackboard/bb_param/bb_float32_array.h"
#include "blackboard/bb_param/bb_float64_array.h"
#include "blackboard/bb_param/bb_int.h" #include "blackboard/bb_param/bb_int.h"
#include "blackboard/bb_param/bb_int_array.h" #include "blackboard/bb_param/bb_int32_array.h"
#include "blackboard/bb_param/bb_int64_array.h"
#include "blackboard/bb_param/bb_node.h" #include "blackboard/bb_param/bb_node.h"
#include "blackboard/bb_param/bb_param.h" #include "blackboard/bb_param/bb_param.h"
#include "blackboard/bb_param/bb_plane.h" #include "blackboard/bb_param/bb_plane.h"
#include "blackboard/bb_param/bb_projection.h"
#include "blackboard/bb_param/bb_quaternion.h" #include "blackboard/bb_param/bb_quaternion.h"
#include "blackboard/bb_param/bb_rect2.h" #include "blackboard/bb_param/bb_rect2.h"
#include "blackboard/bb_param/bb_rect2i.h" #include "blackboard/bb_param/bb_rect2i.h"
@ -196,11 +199,14 @@ void initialize_limboai_module(ModuleInitializationLevel p_level) {
GDREGISTER_CLASS(BBColorArray); GDREGISTER_CLASS(BBColorArray);
GDREGISTER_CLASS(BBDictionary); GDREGISTER_CLASS(BBDictionary);
GDREGISTER_CLASS(BBFloat); GDREGISTER_CLASS(BBFloat);
GDREGISTER_CLASS(BBFloatArray); GDREGISTER_CLASS(BBFloat32Array);
GDREGISTER_CLASS(BBFloat64Array);
GDREGISTER_CLASS(BBInt); GDREGISTER_CLASS(BBInt);
GDREGISTER_CLASS(BBIntArray); GDREGISTER_CLASS(BBInt32Array);
GDREGISTER_CLASS(BBInt64Array);
GDREGISTER_CLASS(BBNode); GDREGISTER_CLASS(BBNode);
GDREGISTER_CLASS(BBPlane); GDREGISTER_CLASS(BBPlane);
GDREGISTER_CLASS(BBProjection);
GDREGISTER_CLASS(BBQuaternion); GDREGISTER_CLASS(BBQuaternion);
GDREGISTER_CLASS(BBRect2); GDREGISTER_CLASS(BBRect2);
GDREGISTER_CLASS(BBRect2i); GDREGISTER_CLASS(BBRect2i);