Skip to content

Commit

Permalink
Add BBParam missing types
Browse files Browse the repository at this point in the history
  • Loading branch information
limbonaut committed Jan 19, 2024
1 parent 881a32f commit 33b455f
Show file tree
Hide file tree
Showing 15 changed files with 150 additions and 39 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ on:
- "README.md"
- "LICENSE"
- "**/*.png"
- "demo/*"
- "doc/*"
- "demo/**"
- "doc/**"

pull_request:
branches: [ master ]
paths-ignore:
- "README.md"
- "LICENSE"
- "**/*.png"
- "demo/*"
- "doc/*"
- "demo/**"
- "doc/**"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
24 changes: 24 additions & 0 deletions blackboard/bb_param/bb_float32_array.h
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
/**
* 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
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
* =============================================================================
*/

#ifndef BB_FLOAT_ARRAY_H
#define BB_FLOAT_ARRAY_H
#ifndef BB_FLOAT64_ARRAY_H
#define BB_FLOAT64_ARRAY_H

#include "bb_param.h"

class BBFloatArray : public BBParam {
GDCLASS(BBFloatArray, BBParam);
class BBFloat64Array : public BBParam {
GDCLASS(BBFloat64Array, BBParam);

protected:
virtual Variant::Type get_type() const override { return Variant::PACKED_FLOAT64_ARRAY; }
};

#endif // BB_FLOAT_ARRAY_H
#endif // BB_FLOAT64_ARRAY_H
24 changes: 24 additions & 0 deletions blackboard/bb_param/bb_int32_array.h
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
/**
* 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
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
* =============================================================================
*/

#ifndef BB_INT_ARRAY_H
#define BB_INT_ARRAY_H
#ifndef BB_INT64_ARRAY_H
#define BB_INT64_ARRAY_H

#include "bb_param.h"

class BBIntArray : public BBParam {
GDCLASS(BBIntArray, BBParam);
class BBInt64Array : public BBParam {
GDCLASS(BBInt64Array, BBParam);

protected:
virtual Variant::Type get_type() const override { return Variant::PACKED_INT64_ARRAY; }
};

#endif // BB_INT_ARRAY_H
#endif // BB_INT64_ARRAY_H
4 changes: 2 additions & 2 deletions blackboard/bb_param/bb_param.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* bb_param.h
* =============================================================================
* Copyright 2021-2023 Serhii Snitsaruk
* 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
Expand Down Expand Up @@ -84,4 +84,4 @@ class BBParam : public Resource {
BBParam();
};

#endif // BB_PARAM_H
#endif // BB_PARAM_H
24 changes: 24 additions & 0 deletions blackboard/bb_param/bb_projection.h
Original file line number Diff line number Diff line change
@@ -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
7 changes: 5 additions & 2 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,15 @@ def get_doc_classes():
"BBColorArray",
"BBDictionary",
"BBFloat",
"BBFloatArray",
"BBFloat32Array",
"BBFloat64Array",
"BBInt",
"BBIntArray",
"BBInt32Array",
"BBInt64Array",
"BBNode",
"BBParam",
"BBPlane",
"BBProjection",
"BBQuat",
"BBQuaternion",
"BBRealArray",
Expand Down
10 changes: 10 additions & 0 deletions doc_classes/BBFloat32Array.xml
Original file line number Diff line number Diff line change
@@ -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>
10 changes: 10 additions & 0 deletions doc_classes/BBFloat64Array.xml
Original file line number Diff line number Diff line change
@@ -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>
10 changes: 10 additions & 0 deletions doc_classes/BBInt32Array.xml
Original file line number Diff line number Diff line change
@@ -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>
10 changes: 10 additions & 0 deletions doc_classes/BBInt64Array.xml
Original file line number Diff line number Diff line change
@@ -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>
10 changes: 0 additions & 10 deletions doc_classes/BBIntArray.xml

This file was deleted.

4 changes: 2 additions & 2 deletions doc_classes/BBFloatArray.xml → doc_classes/BBProjection.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?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>
FloatArray-type parameter for [BehaviorTree] tasks. See [BBParam].
Projection-type parameter for [BehaviorTree] tasks. See [BBParam].
</brief_description>
<description>
</description>
Expand Down
16 changes: 11 additions & 5 deletions register_types.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* register_types.cpp
* =============================================================================
* Copyright 2021-2023 Serhii Snitsaruk
* 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
Expand All @@ -20,12 +20,15 @@
#include "blackboard/bb_param/bb_color_array.h"
#include "blackboard/bb_param/bb_dictionary.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_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_param.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_rect2.h"
#include "blackboard/bb_param/bb_rect2i.h"
Expand Down Expand Up @@ -196,11 +199,14 @@ void initialize_limboai_module(ModuleInitializationLevel p_level) {
GDREGISTER_CLASS(BBColorArray);
GDREGISTER_CLASS(BBDictionary);
GDREGISTER_CLASS(BBFloat);
GDREGISTER_CLASS(BBFloatArray);
GDREGISTER_CLASS(BBFloat32Array);
GDREGISTER_CLASS(BBFloat64Array);
GDREGISTER_CLASS(BBInt);
GDREGISTER_CLASS(BBIntArray);
GDREGISTER_CLASS(BBInt32Array);
GDREGISTER_CLASS(BBInt64Array);
GDREGISTER_CLASS(BBNode);
GDREGISTER_CLASS(BBPlane);
GDREGISTER_CLASS(BBProjection);
GDREGISTER_CLASS(BBQuaternion);
GDREGISTER_CLASS(BBRect2);
GDREGISTER_CLASS(BBRect2i);
Expand Down

0 comments on commit 33b455f

Please sign in to comment.