From ccaee3ae365bf61c5b67cde0d5ae3d63b6b52ec2 Mon Sep 17 00:00:00 2001 From: MakhamDev Date: Sun, 1 Oct 2023 13:37:54 +0700 Subject: [PATCH] 1.15.3.1 --- scripts/__VFX/__VFX.gml | 15 ++++++++------- scripts/node_number/node_number.gml | 12 +++++++++--- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/scripts/__VFX/__VFX.gml b/scripts/__VFX/__VFX.gml index 108536258..cc23a1cb9 100644 --- a/scripts/__VFX/__VFX.gml +++ b/scripts/__VFX/__VFX.gml @@ -24,9 +24,10 @@ function __part(_node) constructor { turning = 0; turnSpd = 0; - accel = 0; - wig = 0; - spVec = [ 0, 0 ]; + accel = 0; + spVec = [ 0, 0 ]; + + wig_pos = 0; boundary_data = -1; @@ -77,7 +78,7 @@ function __part(_node) constructor { node.onPartCreate(self); } - static setPhysic = function(_sx, _sy, _ac, _g, _gDir, _wig, _turn, _turnSpd) { + static setPhysic = function(_sx, _sy, _ac, _g, _gDir, _wig_pos, _turn, _turnSpd) { speedx = _sx; speedy = _sy; accel = _ac; @@ -89,7 +90,7 @@ function __part(_node) constructor { turning = _turn; turnSpd = _turnSpd; - wig = _wig; + wig_pos = _wig_pos; spVec[0] = point_distance(0, 0, speedx, speedy); spVec[1] = point_direction(0, 0, speedx, speedy); @@ -146,8 +147,8 @@ function __part(_node) constructor { diss = max(0, diss + accel); if(speedx != 0 || speedy != 0) { - if(wig != 0) - dirr += random_range(-wig, wig); + if(wig_pos != 0) + dirr += random_range(-wig_pos, wig_pos); if(turning != 0) { var trn = turnSpd? turning * diss : turning; diff --git a/scripts/node_number/node_number.gml b/scripts/node_number/node_number.gml index af46f8846..467f80e68 100644 --- a/scripts/node_number/node_number.gml +++ b/scripts/node_number/node_number.gml @@ -501,7 +501,7 @@ function Node_Vector_Split(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro previewable = false; w = 96; - min_h = 32 + 24 * 4; + min_h = 32; draw_padding = 4; inputs[| 0] = nodeValue("Vector", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0 ]) @@ -520,7 +520,7 @@ function Node_Vector_Split(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro type = VALUE_TYPE.integer; inputs[| 0].type = type; - for( var i = 0; i < 4; i++ ) + for( var i = 0; i < 4; i++ ) outputs[| i].type = type; } @@ -530,7 +530,13 @@ function Node_Vector_Split(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { draw_set_text(f_h1, fa_center, fa_center, COLORS._main_text); - var str = $"{outputs[| 0].getValueCached()}\n{outputs[| 1].getValueCached()}\n{outputs[| 2].getValueCached()}\n{outputs[| 3].getValueCached()}"; + var str = ""; + for( var i = 0; i < 4; i++ ) { + if(outputs[| i].visible) + str += $"{outputs[| 0].getValueCached()}\n"; + } + + str = string_trim(str); var bbox = drawGetBbox(xx, yy, _s); var ss = string_scale(str, bbox.w, bbox.h); draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0);