Skip to content

Commit 087cca9

Browse files
Update to use of macro for registering classes
1 parent 3ba4742 commit 087cca9

File tree

4 files changed

+16
-45
lines changed

4 files changed

+16
-45
lines changed

SConstruct

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ else:
5959

6060
if env["target"] in ["editor", "template_debug"]:
6161
try:
62-
doc_data = env.GodotCPPDocData("src/gen/doc_data.gen.cpp", source=Glob("doc_classes/*.xml"))
62+
doc_data = env.GodotCPPDocData("src/gen/doc_data.gen.cpp", source=Glob("./doc_classes/*.xml"))
6363
sources.append(doc_data)
6464
print(doc_data)
6565
except AttributeError:

config.py

Lines changed: 0 additions & 33 deletions
This file was deleted.

godotcord_activity.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#ifndef GODOTCORD_ACTIVITY_H
22
#define GODOTCORD_ACTIVITY_H
33

4+
#ifdef IGNORE
5+
#undef IGNORE
6+
#endif
7+
48
#include <godot_cpp/classes/ref_counted.hpp>
59
#include <godot_cpp/classes/ref.hpp>
610

@@ -107,4 +111,4 @@ class GodotcordActivity : public RefCounted {
107111
VARIANT_ENUM_CAST(GodotcordActivity::ActivityRequestReply);
108112
VARIANT_ENUM_CAST(GodotcordActivity::ActivityActionType);
109113

110-
#endif
114+
#endif

register_types.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ using namespace godot;
2727
void register_godotcord_types(ModuleInitializationLevel l) {
2828
if (l != ModuleInitializationLevel::MODULE_INITIALIZATION_LEVEL_SCENE) return;
2929

30-
ClassDB::register_class<Godotcord>();
31-
ClassDB::register_class<GodotcordActivity>();
32-
ClassDB::register_class<GodotcordRelationship>();
33-
ClassDB::register_class<GodotcordPresence>();
34-
ClassDB::register_class<GodotcordUser>();
35-
36-
ClassDB::register_class<GodotcordActivityManager>();
37-
ClassDB::register_class<GodotcordOverlayManager>();
38-
ClassDB::register_class<GodotcordRelationshipManager>();
39-
ClassDB::register_class<GodotcordUserManager>();
30+
GDREGISTER_CLASS(Godotcord)
31+
GDREGISTER_CLASS(GodotcordActivity);
32+
GDREGISTER_CLASS(GodotcordRelationship);
33+
GDREGISTER_CLASS(GodotcordPresence);
34+
GDREGISTER_CLASS(GodotcordUser);
35+
36+
GDREGISTER_CLASS(GodotcordActivityManager);
37+
GDREGISTER_CLASS(GodotcordOverlayManager);
38+
GDREGISTER_CLASS(GodotcordRelationshipManager);
39+
GDREGISTER_CLASS(GodotcordUserManager);
4040

4141
GC_ptr = memnew(Godotcord);
4242
Engine::get_singleton()->register_singleton("Godotcord", Godotcord::get_singleton());

0 commit comments

Comments
 (0)