You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Prevent LSP adding signal func to non GDScripts
(cherry picked from commit 66f1b4bf66)
This commit is contained in:
committed by
Rémi Verschelde
parent
0845f20784
commit
ba1d6b7532
@@ -53,9 +53,13 @@ void GDScriptWorkspace::_bind_methods() {
|
||||
}
|
||||
|
||||
void GDScriptWorkspace::apply_new_signal(Object *obj, String function, PoolStringArray args) {
|
||||
String function_signature = "func " + function;
|
||||
Ref<Script> script = obj->get_script();
|
||||
|
||||
if (script->get_language()->get_name() != "GDScript") {
|
||||
return;
|
||||
}
|
||||
|
||||
String function_signature = "func " + function;
|
||||
String source = script->get_source_code();
|
||||
|
||||
if (source.find(function_signature) != -1) {
|
||||
|
||||
Reference in New Issue
Block a user