diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-08-29 14:33:27 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-08-29 14:33:27 -0300 |
commit | c812c176330bfc53a780c0a7c8a9091ddb90f352 (patch) | |
tree | 6aec0d6f0b9d0f0005298d49cff4ebc3a242b437 | |
parent | e8b05ca996baa9819f55fc1d190a79d24906bde7 (diff) |
Made some methods to check method/signal availability in GDScript, closes #9800
-rw-r--r-- | core/script_language.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/script_language.cpp b/core/script_language.cpp index 9a891f9e52..f2be15897e 100644 --- a/core/script_language.cpp +++ b/core/script_language.cpp @@ -54,6 +54,12 @@ void Script::_bind_methods() { ClassDB::bind_method(D_METHOD("get_source_code"), &Script::get_source_code); ClassDB::bind_method(D_METHOD("set_source_code", "source"), &Script::set_source_code); ClassDB::bind_method(D_METHOD("reload", "keep_state"), &Script::reload, DEFVAL(false)); + + ClassDB::bind_method(D_METHOD("has_method", "method_name"), &Script::has_method); + ClassDB::bind_method(D_METHOD("has_script_signal", "signal_name"), &Script::has_script_signal); + + ClassDB::bind_method(D_METHOD("is_tool"), &Script::is_tool); + ClassDB::bind_method(D_METHOD("get_node_type"), &Script::get_node_type); } void ScriptServer::set_scripting_enabled(bool p_enabled) { |