33
33
String DocData::get_default_value_string (const Variant &p_value) {
34
34
if (p_value.get_type () == Variant::ARRAY) {
35
35
return Variant (Array (p_value, 0 , StringName (), Variant ())).get_construct_string ().replace (" \n " , " " );
36
+ } else if (p_value.get_type () == Variant::DICTIONARY) {
37
+ return Variant (Dictionary (p_value, 0 , StringName (), Variant (), 0 , StringName (), Variant ())).get_construct_string ().replace (" \n " , " " );
36
38
} else {
37
39
return p_value.get_construct_string ().replace (" \n " , " " );
38
40
}
@@ -57,6 +59,8 @@ void DocData::return_doc_from_retinfo(DocData::MethodDoc &p_method, const Proper
57
59
p_method.return_type = p_retinfo.class_name ;
58
60
} else if (p_retinfo.type == Variant::ARRAY && p_retinfo.hint == PROPERTY_HINT_ARRAY_TYPE) {
59
61
p_method.return_type = p_retinfo.hint_string + " []" ;
62
+ } else if (p_retinfo.type == Variant::DICTIONARY && p_retinfo.hint == PROPERTY_HINT_DICTIONARY_TYPE) {
63
+ p_method.return_type = " Dictionary[" + p_retinfo.hint_string .replace (" ;" , " , " ) + " ]" ;
60
64
} else if (p_retinfo.hint == PROPERTY_HINT_RESOURCE_TYPE) {
61
65
p_method.return_type = p_retinfo.hint_string ;
62
66
} else if (p_retinfo.type == Variant::NIL && p_retinfo.usage & PROPERTY_USAGE_NIL_IS_VARIANT) {
@@ -89,6 +93,8 @@ void DocData::argument_doc_from_arginfo(DocData::ArgumentDoc &p_argument, const
89
93
p_argument.type = p_arginfo.class_name ;
90
94
} else if (p_arginfo.type == Variant::ARRAY && p_arginfo.hint == PROPERTY_HINT_ARRAY_TYPE) {
91
95
p_argument.type = p_arginfo.hint_string + " []" ;
96
+ } else if (p_arginfo.type == Variant::DICTIONARY && p_arginfo.hint == PROPERTY_HINT_DICTIONARY_TYPE) {
97
+ p_argument.type = " Dictionary[" + p_arginfo.hint_string .replace (" ;" , " , " ) + " ]" ;
92
98
} else if (p_arginfo.hint == PROPERTY_HINT_RESOURCE_TYPE) {
93
99
p_argument.type = p_arginfo.hint_string ;
94
100
} else if (p_arginfo.type == Variant::NIL) {
0 commit comments