Override _to_string() to print useful info about objects in GDExtension
This commit is contained in:
parent
ac209e7fc3
commit
16a3bb0273
|
@ -40,6 +40,10 @@ private:
|
|||
protected:
|
||||
static void _bind_methods();
|
||||
|
||||
#ifdef LIMBOAI_GDEXTENSION
|
||||
String _to_string() const { return "<" + get_class() + "#" + itos(get_instance_id()) + ">"; }
|
||||
#endif
|
||||
|
||||
public:
|
||||
void set_parent(const Ref<Blackboard> &p_blackboard) { parent = p_blackboard; }
|
||||
Ref<Blackboard> get_parent() const { return parent; }
|
||||
|
|
|
@ -55,6 +55,10 @@ protected:
|
|||
bool _property_can_revert(const StringName &p_name) const;
|
||||
bool _property_get_revert(const StringName &p_name, Variant &r_property) const;
|
||||
|
||||
#ifdef LIMBOAI_GDEXTENSION
|
||||
String _to_string() const { return "<" + get_class() + "#" + itos(get_instance_id()) + ">"; }
|
||||
#endif
|
||||
|
||||
public:
|
||||
void set_base_plan(const Ref<BlackboardPlan> &p_base);
|
||||
Ref<BlackboardPlan> get_base_plan() const { return base; }
|
||||
|
|
|
@ -43,6 +43,10 @@ private:
|
|||
protected:
|
||||
static void _bind_methods();
|
||||
|
||||
#ifdef LIMBOAI_GDEXTENSION
|
||||
String _to_string() const { return "<" + get_class() + "#" + itos(get_instance_id()) + ">"; }
|
||||
#endif
|
||||
|
||||
public:
|
||||
#ifdef LIMBOAI_MODULE
|
||||
virtual bool editor_can_reload_from_file() override { return false; }
|
||||
|
|
|
@ -37,6 +37,10 @@ private:
|
|||
protected:
|
||||
static void _bind_methods();
|
||||
|
||||
#ifdef LIMBOAI_GDEXTENSION
|
||||
String _to_string() const { return "<" + get_class() + "#" + itos(get_instance_id()) + ">"; }
|
||||
#endif
|
||||
|
||||
public:
|
||||
_FORCE_INLINE_ Ref<BTTask> get_root_task() const { return root_task; }
|
||||
_FORCE_INLINE_ Node *get_owner_node() const { return owner_node_id ? Object::cast_to<Node>(OBJECT_DB_GET_INSTANCE(owner_node_id)) : nullptr; }
|
||||
|
|
|
@ -56,6 +56,10 @@ protected:
|
|||
|
||||
void _notification(int p_notification);
|
||||
|
||||
#ifdef LIMBOAI_GDEXTENSION
|
||||
String _to_string() const { return String(get_name()) + ":<" + get_class() + "#" + itos(get_instance_id()) + ">"; }
|
||||
#endif
|
||||
|
||||
public:
|
||||
void set_behavior_tree(const Ref<BehaviorTree> &p_tree);
|
||||
Ref<BehaviorTree> get_behavior_tree() const { return behavior_tree; };
|
||||
|
|
|
@ -111,6 +111,10 @@ protected:
|
|||
GDVIRTUAL1R(Status, _tick, double);
|
||||
GDVIRTUAL0RC(PackedStringArray, _get_configuration_warnings);
|
||||
|
||||
#ifdef LIMBOAI_GDEXTENSION
|
||||
String _to_string() const { return "<" + get_class() + "#" + itos(get_instance_id()) + ">"; }
|
||||
#endif
|
||||
|
||||
public:
|
||||
// TODO: GDExtension doesn't have this method hmm...
|
||||
|
||||
|
|
|
@ -65,6 +65,10 @@ protected:
|
|||
GDVIRTUAL0(_exit);
|
||||
GDVIRTUAL1(_update, double);
|
||||
|
||||
#ifdef LIMBOAI_GDEXTENSION
|
||||
String _to_string() const { return String(get_name()) + ":<" + get_class() + "#" + itos(get_instance_id()) + ">"; }
|
||||
#endif
|
||||
|
||||
public:
|
||||
void set_blackboard_plan(const Ref<BlackboardPlan> &p_plan);
|
||||
_FORCE_INLINE_ Ref<BlackboardPlan> get_blackboard_plan() const { return blackboard_plan; }
|
||||
|
|
Loading…
Reference in New Issue