summaryrefslogtreecommitdiff
path: root/core/variant_call.cpp
diff options
context:
space:
mode:
authorBojidar Marinov <bojidar.marinov.bg@gmail.com>2018-03-09 21:16:08 +0200
committerBojidar Marinov <bojidar.marinov.bg@gmail.com>2018-03-13 17:18:08 +0200
commit9f6c0c6eaef754f2049ee536c5b38bfdc65fbd08 (patch)
tree823f108360644d6403500810f31d08d7d5e37160 /core/variant_call.cpp
parentb84236944215445be191047ab628e570ffd69e99 (diff)
Duplicate Arrays and Dictionaries when instancing scene in editor
Also, add deep (=false) parameter to Array.duplicate and Dictionary.duplicate Fixes #13971
Diffstat (limited to 'core/variant_call.cpp')
-rw-r--r--core/variant_call.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/variant_call.cpp b/core/variant_call.cpp
index cda7dccf0c..c6e093010d 100644
--- a/core/variant_call.cpp
+++ b/core/variant_call.cpp
@@ -465,7 +465,7 @@ struct _VariantCall {
VCALL_LOCALMEM0R(Dictionary, hash);
VCALL_LOCALMEM0R(Dictionary, keys);
VCALL_LOCALMEM0R(Dictionary, values);
- VCALL_LOCALMEM0R(Dictionary, duplicate);
+ VCALL_LOCALMEM1R(Dictionary, duplicate);
VCALL_LOCALMEM2(Array, set);
VCALL_LOCALMEM1R(Array, get);
@@ -494,7 +494,7 @@ struct _VariantCall {
VCALL_LOCALMEM0(Array, shuffle);
VCALL_LOCALMEM2R(Array, bsearch);
VCALL_LOCALMEM4R(Array, bsearch_custom);
- VCALL_LOCALMEM0R(Array, duplicate);
+ VCALL_LOCALMEM1R(Array, duplicate);
VCALL_LOCALMEM0(Array, invert);
static void _call_PoolByteArray_get_string_from_ascii(Variant &r_ret, Variant &p_self, const Variant **p_args) {
@@ -1613,7 +1613,7 @@ void register_variant_methods() {
ADDFUNC0R(DICTIONARY, INT, Dictionary, hash, varray());
ADDFUNC0R(DICTIONARY, ARRAY, Dictionary, keys, varray());
ADDFUNC0R(DICTIONARY, ARRAY, Dictionary, values, varray());
- ADDFUNC0R(DICTIONARY, DICTIONARY, Dictionary, duplicate, varray());
+ ADDFUNC1R(DICTIONARY, DICTIONARY, Dictionary, duplicate, BOOL, "deep", varray(false));
ADDFUNC0R(ARRAY, INT, Array, size, varray());
ADDFUNC0R(ARRAY, BOOL, Array, empty, varray());
@@ -1641,7 +1641,7 @@ void register_variant_methods() {
ADDFUNC2R(ARRAY, INT, Array, bsearch, NIL, "value", BOOL, "before", varray(true));
ADDFUNC4R(ARRAY, INT, Array, bsearch_custom, NIL, "value", OBJECT, "obj", STRING, "func", BOOL, "before", varray(true));
ADDFUNC0NC(ARRAY, NIL, Array, invert, varray());
- ADDFUNC0RNC(ARRAY, ARRAY, Array, duplicate, varray());
+ ADDFUNC1R(ARRAY, ARRAY, Array, duplicate, BOOL, "deep", varray(false));
ADDFUNC0R(POOL_BYTE_ARRAY, INT, PoolByteArray, size, varray());
ADDFUNC2(POOL_BYTE_ARRAY, NIL, PoolByteArray, set, INT, "idx", INT, "byte", varray());