summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-09-11 15:36:52 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-09-11 15:36:52 +0200
commit13f0ab88f2923c7dfa5f105db10d12a10d3445dc (patch)
tree5330ae65249435354e966eee3e6170ca4a8d719e /modules/gdscript/gdscript.h
parentafd01030a85b5e7d7cf8c04e14045658de4d7d9c (diff)
parent462d8f47521d3406a7ee8b5b024699112c4337aa (diff)
downloadredot-engine-13f0ab88f2923c7dfa5f105db10d12a10d3445dc.tar.gz
Merge pull request #81079 from dalexeev/gds-fix-get-method-list
GDScript: Fix `get_*_list()` methods return incorrect info
Diffstat (limited to 'modules/gdscript/gdscript.h')
-rw-r--r--modules/gdscript/gdscript.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/modules/gdscript/gdscript.h b/modules/gdscript/gdscript.h
index 0ba007683c..0eaaac8811 100644
--- a/modules/gdscript/gdscript.h
+++ b/modules/gdscript/gdscript.h
@@ -69,6 +69,7 @@ class GDScript : public Script {
StringName setter;
StringName getter;
GDScriptDataType data_type;
+ PropertyInfo property_info;
};
struct ClearData {
@@ -100,7 +101,7 @@ class GDScript : public Script {
HashMap<StringName, GDScriptFunction *> member_functions;
HashMap<StringName, MemberInfo> member_indices; //members are just indices to the instantiated script.
HashMap<StringName, Ref<GDScript>> subclasses;
- HashMap<StringName, Vector<StringName>> _signals;
+ HashMap<StringName, MethodInfo> _signals;
Dictionary rpc_config;
#ifdef TOOLS_ENABLED
@@ -126,8 +127,6 @@ class GDScript : public Script {
void _add_doc(const DocData::ClassDoc &p_inner_class);
#endif
- HashMap<StringName, PropertyInfo> member_info;
-
GDScriptFunction *implicit_initializer = nullptr;
GDScriptFunction *initializer = nullptr; //direct pointer to new , faster to locate
GDScriptFunction *implicit_ready = nullptr;
@@ -142,7 +141,8 @@ class GDScript : public Script {
//exported members
String source;
String path;
- String name;
+ StringName local_name; // Inner class identifier or `class_name`.
+ StringName global_name; // `class_name`.
String fully_qualified_name;
String simplified_icon_path;
SelfList<GDScript> script_list;
@@ -174,9 +174,6 @@ class GDScript : public Script {
void _get_script_method_list(List<MethodInfo> *r_list, bool p_include_base) const;
void _get_script_signal_list(List<MethodInfo> *r_list, bool p_include_base) const;
- // This method will map the class name from "RefCounted" to "MyClass.InnerClass".
- static String _get_gdscript_reference_class_name(const GDScript *p_gdscript);
-
GDScript *_get_gdscript_from_variant(const Variant &p_variant);
void _get_dependencies(RBSet<GDScript *> &p_dependencies, const GDScript *p_except);
@@ -194,6 +191,8 @@ public:
static String debug_get_script_name(const Ref<Script> &p_script);
#endif
+ _FORCE_INLINE_ StringName get_local_name() const { return local_name; }
+
void clear(GDScript::ClearData *p_clear_data = nullptr);
virtual bool is_valid() const override { return valid; }
@@ -214,7 +213,6 @@ public:
}
const HashMap<StringName, GDScriptFunction *> &get_member_functions() const { return member_functions; }
const Ref<GDScriptNativeClass> &get_native() const { return native; }
- const String &get_script_class_name() const { return name; }
RBSet<GDScript *> get_dependencies();
RBSet<GDScript *> get_inverted_dependencies();