diff --git a/scripts/node_align_functions/node_align_functions.gml b/scripts/node_align_functions/node_align_functions.gml index 4dc0bcf7a..3bf1e791b 100644 --- a/scripts/node_align_functions/node_align_functions.gml +++ b/scripts/node_align_functions/node_align_functions.gml @@ -63,7 +63,7 @@ function node_valign(nodeList, alignment = fa_middle) { } function node_hdistribute(nodeList) { - var amo = array_length(nodeList); + var amo = array_length(nodeList); var nodes = ds_priority_create(); var x0 = 999999; @@ -87,7 +87,7 @@ function node_hdistribute(nodeList) { } function node_vdistribute(nodeList) { - var amo = ds_list_size(nodeList); + var amo = array_length(nodeList); var nodes = ds_priority_create(); var y0 = 999999; diff --git a/scripts/node_array/node_array.gml b/scripts/node_array/node_array.gml index 3c6eebb58..2e7614e68 100644 --- a/scripts/node_array/node_array.gml +++ b/scripts/node_array/node_array.gml @@ -82,6 +82,8 @@ function Node_Array(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { return inputs[| index]; } if(!LOADING && !APPENDING) createNewInput(); #endregion + //dummy_input = nodeValue("Add value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0).setDummy(function() { return createNewInput(); }); + static refreshDynamicInput = function() { #region var _l = ds_list_create(); var amo = attributes.size; @@ -164,6 +166,7 @@ function Node_Array(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var _typ = getType(); if(_typ != VALUE_TYPE.any) return; + if(index >= ds_list_size(inputs)) return; inputs[| index].setType(inputs[| index].value_from? inputs[| index].value_from.type : _typ); inputs[| index].resetDisplay(); diff --git a/scripts/node_value/node_value.gml b/scripts/node_value/node_value.gml index 154058c0a..9d4b0a2cb 100644 --- a/scripts/node_value/node_value.gml +++ b/scripts/node_value/node_value.gml @@ -567,6 +567,9 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru active_tooltip = ""; tags = VALUE_TAG.none; + + is_dummy = false; + dummy_get = noone; #endregion #region ---- connection ---- @@ -732,6 +735,13 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru con_index = -1; #endregion + static setDummy = function(get_node) { #region + is_dummy = true; + dummy_get = get_node; + + return self; + } #endregion + static setDefault = function(vals) { #region if(LOADING || APPENDING) return self;