From f031e72395df458be15b84374fc5cc371d072de3 Mon Sep 17 00:00:00 2001 From: Emmanuel Leblond Date: Tue, 14 Jul 2020 23:12:44 +0200 Subject: [PATCH] Add missing has_default_value field for signals in api.json (cherry picked from commit 37de4982caef5ad9909a87e071be3c933927cccb) --- modules/gdnative/nativescript/api_generator.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/gdnative/nativescript/api_generator.cpp b/modules/gdnative/nativescript/api_generator.cpp index 48a1d26f4f3..256c44febcd 100644 --- a/modules/gdnative/nativescript/api_generator.cpp +++ b/modules/gdnative/nativescript/api_generator.cpp @@ -458,6 +458,7 @@ static List generate_c_api_json(const List &p_api) { source.push_back("\t\t\t\t\t{\n"); source.push_back("\t\t\t\t\t\t\"name\": \"" + e->get().argument_names[i] + "\",\n"); source.push_back("\t\t\t\t\t\t\"type\": \"" + e->get().argument_types[i] + "\",\n"); + source.push_back(String("\t\t\t\t\t\t\"has_default_value\": ") + (e->get().default_arguments.has(i) ? "true" : "false") + ",\n"); source.push_back("\t\t\t\t\t\t\"default_value\": \"" + (e->get().default_arguments.has(i) ? (String)e->get().default_arguments[i] : "") + "\"\n"); source.push_back(String("\t\t\t\t\t}") + ((i < e->get().argument_names.size() - 1) ? "," : "") + "\n"); }