From 687013714d9b227a724f1661a204983a022c02e2 Mon Sep 17 00:00:00 2001 From: Tanasart Date: Wed, 10 Jul 2024 10:47:21 +0700 Subject: [PATCH] - [Graph Panel] Fix junction not updating its initial position when a node is created while playing. --- scripts/node_data/node_data.gml | 4 ++-- scripts/node_data/node_data.yy | 2 +- scripts/node_image_sheet/node_image_sheet.gml | 20 +++++++++---------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/scripts/node_data/node_data.gml b/scripts/node_data/node_data.gml index d9196515c..527fdec14 100644 --- a/scripts/node_data/node_data.gml +++ b/scripts/node_data/node_data.gml @@ -600,7 +600,7 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { return output_display_list[index]; } #endregion - static updateIO = function() { #region + static updateIO = function() { for( var i = 0, n = ds_list_size(inputs); i < n; i++ ) inputs[| i].visible_in_list = false; @@ -621,7 +621,7 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { outputs_amount = output_display_list == -1? ds_list_size(outputs) : array_length(output_display_list); outputs_index = array_create_ext(outputs_amount, function(index) { return getOutputJunctionIndex(index); }); - } #endregion + } run_in(1, function() /*=>*/ { updateIO() }); static setHeight = function() { #region w = show_parameter? attributes.node_param_width : min_w; diff --git a/scripts/node_data/node_data.yy b/scripts/node_data/node_data.yy index 627c2ef23..5779d766f 100644 --- a/scripts/node_data/node_data.yy +++ b/scripts/node_data/node_data.yy @@ -1,5 +1,5 @@ { - "$GMScript":"v1", + "$GMScript":"", "%Name":"node_data", "isCompatibility":false, "isDnD":false, diff --git a/scripts/node_image_sheet/node_image_sheet.gml b/scripts/node_image_sheet/node_image_sheet.gml index 3a8b2986d..3168a4af8 100644 --- a/scripts/node_image_sheet/node_image_sheet.gml +++ b/scripts/node_image_sheet/node_image_sheet.gml @@ -107,7 +107,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru static onValueFromUpdate = function() { _inSurf = noone; } static onValueUpdate = function() { _inSurf = noone; } - function getSpritePosition(index) { #region + function getSpritePosition(index) { var _dim = curr_dim; var _off = curr_off; var _spa = surf_space; @@ -131,9 +131,9 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru var _y = _off[1] + _irow * (_dim[1] + _spa[1]); return [ _x, _y ]; - } #endregion + } - static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _inSurf = getInputData(0); if(!is_surface(_inSurf)) return; @@ -281,18 +281,18 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru } } #endregion - } #endregion + } - static step = function() { #region + static step = function() { var _out = getInputData(7); var _flty = getInputData(13); inputs[| 11].setVisible(!_out); inputs[| 8].setVisible(!_out); inputs[| 14].setVisible(_flty); - } #endregion + } - static spliceSprite = function() { #region + static spliceSprite = function() { var _inSurf = getInputData(0); if(!is_surface(_inSurf)) return; @@ -410,9 +410,9 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru if(_out == 1) outputs[| 0].setValue(surf_array); outputs[| 1].setValue(atls_array); - } #endregion + } - static update = function(frame = CURRENT_FRAME) { #region + static update = function(frame = CURRENT_FRAME) { spliceSprite(); var _out = getInputData(7); @@ -428,5 +428,5 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru var ind = safe_mod(CURRENT_FRAME * _spd, array_length(surf_array)); outputs[| 0].setValue(array_safe_get_fast(surf_array, ind)); } - } #endregion + } } \ No newline at end of file