diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-09-16 13:34:34 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-09-16 13:34:34 +0200 |
commit | 8ebfd89359d92ae3e785dcc802c831d66b3259e5 (patch) | |
tree | b69c19f901bf8daa3c9587624dcbc810806aba23 /core/object | |
parent | 9fd431f078d7560835da2642c9efe9e235618fe9 (diff) | |
parent | 8835f326b1b8ae0727727fec93ddb1e871571f32 (diff) | |
download | redot-engine-8ebfd89359d92ae3e785dcc802c831d66b3259e5.tar.gz |
Merge pull request #96024 from Ryan-000/expose_get_rpc_config
Expose `get_rpc_config` and `get_node_rpc_config`
Diffstat (limited to 'core/object')
-rw-r--r-- | core/object/script_language.cpp | 2 | ||||
-rw-r--r-- | core/object/script_language.h | 2 | ||||
-rw-r--r-- | core/object/script_language_extension.h | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/core/object/script_language.cpp b/core/object/script_language.cpp index d5b7bc768d..d2fc7392c8 100644 --- a/core/object/script_language.cpp +++ b/core/object/script_language.cpp @@ -174,6 +174,8 @@ void Script::_bind_methods() { ClassDB::bind_method(D_METHOD("is_tool"), &Script::is_tool); ClassDB::bind_method(D_METHOD("is_abstract"), &Script::is_abstract); + ClassDB::bind_method(D_METHOD("get_rpc_config"), &Script::get_rpc_config); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "source_code", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_source_code", "get_source_code"); } diff --git a/core/object/script_language.h b/core/object/script_language.h index d9e2ab1d3c..d0023d70e8 100644 --- a/core/object/script_language.h +++ b/core/object/script_language.h @@ -182,7 +182,7 @@ public: virtual bool is_placeholder_fallback_enabled() const { return false; } - virtual const Variant get_rpc_config() const = 0; + virtual Variant get_rpc_config() const = 0; Script() {} }; diff --git a/core/object/script_language_extension.h b/core/object/script_language_extension.h index c9344f5799..bc773c5ad3 100644 --- a/core/object/script_language_extension.h +++ b/core/object/script_language_extension.h @@ -205,7 +205,7 @@ public: GDVIRTUAL0RC(Variant, _get_rpc_config) - virtual const Variant get_rpc_config() const override { + virtual Variant get_rpc_config() const override { Variant ret; GDVIRTUAL_REQUIRED_CALL(_get_rpc_config, ret); return ret; |