diff --git a/scripts/load_function/load_function.gml b/scripts/load_function/load_function.gml index 55f713983..cdae8736f 100644 --- a/scripts/load_function/load_function.gml +++ b/scripts/load_function/load_function.gml @@ -76,7 +76,7 @@ function LOAD_PATH(path, readonly = false, safe_mode = false) { return PROJECT; } -function LOAD_AT(path, params = new __loadParams()) { #region +function LOAD_AT(path, params = new __loadParams()) { static log = false; CALL("load"); @@ -176,7 +176,7 @@ function LOAD_AT(path, params = new __loadParams()) { #region ds_queue_clear(CONNECTION_CONFLICT); try { - array_foreach(create_list, function(node) { node.loadGroup(); } ); + array_foreach(create_list, function(node) /*=>*/ {return node.loadGroup()} ); } catch(e) { log_warning("LOAD, group", exception_print(e)); @@ -186,7 +186,7 @@ function LOAD_AT(path, params = new __loadParams()) { #region printIf(log, $" > Load group : {(get_timer() - t1) / 1000} ms"); t1 = get_timer(); try { - array_foreach(create_list, function(node) { node.postDeserialize(); } ); + array_foreach(create_list, function(node) /*=>*/ {return node.postDeserialize()} ); } catch(e) { log_warning("LOAD, deserialize", exception_print(e)); } @@ -194,7 +194,7 @@ function LOAD_AT(path, params = new __loadParams()) { #region printIf(log, $" > Deserialize: {(get_timer() - t1) / 1000} ms"); t1 = get_timer(); try { - array_foreach(create_list, function(node) { node.applyDeserialize(); } ); + array_foreach(create_list, function(node) /*=>*/ {return node.applyDeserialize()} ); } catch(e) { log_warning("LOAD, apply deserialize", exception_print(e)); } @@ -202,9 +202,9 @@ function LOAD_AT(path, params = new __loadParams()) { #region printIf(log, $" > Apply deserialize : {(get_timer() - t1) / 1000} ms"); t1 = get_timer(); try { - array_foreach(create_list, function(node) { node.preConnect(); } ); - array_foreach(create_list, function(node) { node.connect(); } ); - array_foreach(create_list, function(node) { node.postConnect(); } ); + array_foreach(create_list, function(node) /*=>*/ {return node.preConnect()} ); + array_foreach(create_list, function(node) /*=>*/ {return node.connect()} ); + array_foreach(create_list, function(node) /*=>*/ {return node.postConnect()} ); } catch(e) { log_warning("LOAD, connect", exception_print(e)); } @@ -275,7 +275,7 @@ function LOAD_AT(path, params = new __loadParams()) { #region LoadPanelStruct(_load_content.layout.panel); return true; -} #endregion +} function __EXPORT_ZIP() { exportPortable(PROJECT); } function __IMPORT_ZIP() { diff --git a/scripts/node_feedback_inline/node_feedback_inline.gml b/scripts/node_feedback_inline/node_feedback_inline.gml index 455666e24..5a40f0f8d 100644 --- a/scripts/node_feedback_inline/node_feedback_inline.gml +++ b/scripts/node_feedback_inline/node_feedback_inline.gml @@ -31,7 +31,7 @@ function Node_Feedback_Inline(_x, _y, _group = noone) : Node(_x, _y, _group) con attributes.junc_out = [ junc_out.node.node_id, junc_out.index ]; } - static scanJunc = function() { #region + static scanJunc = function() { var node_in = PROJECT.nodeMap[? attributes.junc_in[0]]; var node_out = PROJECT.nodeMap[? attributes.junc_out[0]]; @@ -40,9 +40,9 @@ function Node_Feedback_Inline(_x, _y, _group = noone) : Node(_x, _y, _group) con if(junc_in) junc_in.value_from_loop = self; if(junc_out) array_push(junc_out.value_to_loop, self); - } #endregion + } - static updateValue = function() { #region + static updateValue = function() { var type = junc_out.type; var val = junc_out.getValue(); @@ -56,27 +56,28 @@ function Node_Feedback_Inline(_x, _y, _group = noone) : Node(_x, _y, _group) con value_buffer = variable_clone(val); break; } - } #endregion + } - static getValue = function(arr) { #region + static getValue = function(arr) { INLINE arr[@ 0] = value_buffer; arr[@ 1] = junc_out; - } #endregion + } - static drawConnections = function(params = {}) { #region + static drawConnections = function(params = {}) { if(!active) return noone; if(!junc_in || !junc_out) return noone; if(!junc_in.node.active || !junc_out.node.active) return noone; - params.dashed = true; params.loop = true; - var sel = drawJuncConnection(junc_out, junc_in, params); - params.dashed = false; params.loop = false; + params.dashed = true; + params.loop = true; + drawJuncConnection(junc_out, junc_in, params); + params.dashed = false; + params.loop = false; - if(sel) return self; return noone; - } #endregion + } static drawNode = function(_x, _y, _mx, _my, _s, display_parameter = noone) {} @@ -84,8 +85,8 @@ function Node_Feedback_Inline(_x, _y, _group = noone) : Node(_x, _y, _group) con static postDeserialize = function() { scanJunc(); } - static onDestroy = function() { #region + static onDestroy = function() { if(junc_in) junc_in.value_from_loop = noone; if(junc_out) array_remove(junc_out.value_to_loop, self); - } #endregion + } } \ No newline at end of file diff --git a/scripts/node_iterate_inline/node_iterate_inline.gml b/scripts/node_iterate_inline/node_iterate_inline.gml index 46d227aa9..ff8112162 100644 --- a/scripts/node_iterate_inline/node_iterate_inline.gml +++ b/scripts/node_iterate_inline/node_iterate_inline.gml @@ -88,12 +88,12 @@ function Node_Iterate_Inline(_x, _y, _group = noone) : Node_Collection_Inline(_x } static drawConnections = function(params = {}) { - if(!active) return; - if(!junc_in || !junc_out) return; - if(!junc_in.node.active || !junc_out.node.active) return; + if(!active) return noone; + if(!junc_in || !junc_out) return noone; + if(!junc_in.node.active || !junc_out.node.active) return noone; - if(drawJuncConnection(junc_out, junc_in, params)) - return self; + drawJuncConnection(junc_out, junc_in, params); + return noone; } static postDeserialize = function() { diff --git a/scripts/node_value/node_value.gml b/scripts/node_value/node_value.gml index 0cfeb7f72..ee0f9fe95 100644 --- a/scripts/node_value/node_value.gml +++ b/scripts/node_value/node_value.gml @@ -2240,7 +2240,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru return false; } - log_warning("LOAD", $"[Connect] Connection conflict {node.name} to {_nd.name} : Output not exist.", node); + log_warning("LOAD", $"[Connect] Connection conflict {node.name} to {_nd.name} : Output not exist [{con_index}].", node); return false; }