1.15.4 update

This commit is contained in:
MakhamDev 2023-10-08 18:20:31 +07:00
parent 523153a7d5
commit ea76ccf120
10 changed files with 14287 additions and 14015 deletions

Binary file not shown.

File diff suppressed because it is too large Load diff

View file

@ -436,7 +436,6 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co
if(!_render) return;
triggerRender();
render(_time);
} #endregion

View file

@ -73,7 +73,7 @@
function __txt_node_name(node, def = "") {
gml_pragma("forceinline");
if(TESTING) return def;
//if(TESTING) return def;
if(!struct_has(LOCALE.node, node))
return def;
@ -85,7 +85,7 @@
function __txt_node_tooltip(node, def = "") {
gml_pragma("forceinline");
if(TESTING) return def;
//if(TESTING) return def;
if(!struct_has(LOCALE.node, node))
return def;
@ -97,7 +97,7 @@
function __txt_junction_name(node, type, index, def = "") {
gml_pragma("forceinline");
if(TESTING) return def;
//if(TESTING) return def;
if(!struct_has(LOCALE.node, node))
return def;
@ -113,7 +113,7 @@
function __txt_junction_tooltip(node, type, index, def = "") {
gml_pragma("forceinline");
if(TESTING) return def;
//if(TESTING) return def;
if(!struct_has(LOCALE.node, node))
return def;

View file

@ -334,7 +334,6 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
} #endregion
static isActiveDynamic = function() { #region
//if(passiveDynamic) return false;
if(update_on_frame) return true;
for(var i = 0; i < ds_list_size(inputs); i++)

View file

@ -6,6 +6,7 @@ function Node_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
w = 96;
min_h = 32 + 24 * 1;
draw_padding = 4;
display_output = 0;
wd_slider = new slider(0, 1, 0.01, function(val) { inputs[| 0].setValue(val); } );
wd_slider.spr = THEME.node_slider;
@ -30,15 +31,15 @@ function Node_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
outputs[| 0] = nodeValue("Number", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0);
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
var __ax = inputs[| 0].getValueCached();
var __ax = getInputData(0);
if(is_array(__ax)) return;
inputs[| 0].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny);
}
static step = function() {
var int = inputs[| 1].getValueCached();
var disp = inputs[| 2].getValueCached();
var int = getInputData(1);
var disp = getInputData(2);
w = 96;
min_h = 56;
@ -83,9 +84,9 @@ function Node_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
var bbox = drawGetBbox(xx, yy, _s);
var val = display_output;
var disp = inputs[| 2].getValueCached();
var rang = inputs[| 3].getValueCached();
var stp = inputs[| 4].getValueCached();
var disp = getInputData(2);
var rang = getInputData(3);
var stp = getInputData(4);
if(inputs[| 0].value_from != noone || disp == 0) {
draw_set_text(f_h1, fa_center, fa_center, COLORS._main_text);
@ -179,8 +180,8 @@ function Node_Vector2(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
wd_pan_my = 0;
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
var __ax = inputs[| 0].getValueCached();
var __ay = inputs[| 1].getValueCached();
var __ax = getInputData(0);
var __ay = getInputData(1);
if(is_array(__ax) || is_array(__ay)) return;
@ -228,8 +229,8 @@ function Node_Vector2(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
}
static step = function() {
var int = inputs[| 2].getValueCached();
var disp = inputs[| 3].getValueCached();
var int = getInputData(2);
var disp = getInputData(3);
for( var i = 0; i < 2; i++ ) {
inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
@ -257,7 +258,7 @@ function Node_Vector2(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
}
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
var disp = inputs[| 3].getValueCached();
var disp = getInputData(3);
var vec = getSingleValue(0,, true);
var bbox = drawGetBbox(xx, yy, _s);
@ -412,7 +413,7 @@ function Node_Vector3(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
.setDisplay(VALUE_DISPLAY.vector);
static step = function() {
var int = inputs[| 3].getValueCached();
var int = getInputData(3);
for( var i = 0; i < 3; i++ ) {
inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
inputs[| i].editWidget.slide_speed = int? 1 : 0.1;
@ -467,7 +468,7 @@ function Node_Vector4(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
.setDisplay(VALUE_DISPLAY.vector);
static step = function() {
var int = inputs[| 4].getValueCached();
var int = getInputData(4);
for( var i = 0; i < 4; i++ ) {
inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
inputs[| i].editWidget.slide_speed = int? 1 : 0.1;
@ -532,7 +533,7 @@ function Node_Vector_Split(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
draw_set_text(f_h1, fa_center, fa_center, COLORS._main_text);
var str = "";
for( var i = 0; i < 4; i++ )
if(outputs[| i].visible) str += $"{outputs[| i].getValueCached()}\n";
if(outputs[| i].visible) str += $"{outputs[| i].getValue()}\n";
str = string_trim(str);
var bbox = drawGetBbox(xx, yy, _s);

View file

@ -35,7 +35,7 @@ function Node_Particle(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y, _
var _dim = getInputData(input_len + 0);
var _outSurf = outputs[| 0].getValue();
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth());
_outSurf = surface_verify(_outSurf, array_safe_get(_dim, 0, 1), array_safe_get(_dim, 1, 1), attrDepth());
outputs[| 0].setValue(_outSurf);
}
@ -52,18 +52,10 @@ function Node_Particle(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y, _
} #endregion
static onUpdate = function() { #region
if(ANIMATION_STATIC) {
if(!recoverCache()) {
var _dim = getInputData(input_len + 0);
var _outSurf = outputs[| 0].getValue();
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth());
outputs[| 0].setValue(_outSurf);
}
return;
}
if(recoverCache())
return;
if(PROJECT.animator.current_frame == 0)
reset();

View file

@ -45,7 +45,6 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { #regio
if(!_node) return noone;
_node.clearInputCache();
if(!LOADING && !APPENDING) _node.doUpdate();
return _node;
}

View file

@ -1304,10 +1304,6 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
static resetCache = function() { cache_value[0] = false; }
static getValueCached = function(_time = PROJECT.animator.current_frame, applyUnit = true, arrIndex = 0) { #region
return getValue(_time, applyUnit, arrIndex, true);
} #endregion
static getValue = function(_time = PROJECT.animator.current_frame, applyUnit = true, arrIndex = 0, useCache = false, log = false) { #region
if(type == VALUE_TYPE.trigger)
useCache = false;

View file

@ -1,12 +1,5 @@
var _filter = ["x", "y", "updated", "rendered", "show_output_name", "insp2UpdateIcon", "preview_trans", "value_validation", "group", "draw_padding", "draw_droppable",
"preview_drop_y", "badgeInspect", "preview_mx", "temp_surface", "load_scale", "node_id", "show_input_name", "graph_h", "drawLineIndex", "draw_line_shift_x",
"draw_line_shift_y", "cache_array", "drag_mx", "drag_my", "expTree", "value_to", "draw_line_thick", "expUse", "expression", "drag_sx", "drag_sy", "drag_type", "con_node",
"cache_value", "show_graph", "preview_x", "preview_y", "badgePreview", "data_list", "open_rx", "open_ry", "parent", "active", "cached_output", "current_data", "cache_result",
"draw_graph_culled", "dopesheet_y", "render_time", "renderActive", "preview_speed", "preview_drop_x", "preview_drop_y", "inspecting", "value_to_arr", "draw_name", "anim_priority",
"draw_line_vb", "error_notification", "animators", "junction_drawing", "draw_line_shift_hover", "value_from", "is_anim", "popup_dialog", "draw_line_blend", "is_changed",
"on_end", "editWidget", "key_inter", "dyna_depo", "def_length", "con_index", "bg_sel_spr", "load_map", "preview_alpha", "icon", "junction_draw_pad_y", "previewable", "active_range",
"inputMap", "tools", "preview_amount", "anim_show", "active_draw_index", "onSetDisplayName", "previewing", "on_drop_file", "autoUpdatedTrigger", "attributeEditors", "error_noti_update",
"bg_spr", "insp1UpdateIcon", "outputMap", "preview_surface", "manual_updated", "preview_my", "tool_settings", "isTool" ];
var _filter = [ "name", "tooltip", "type", "input_display_list", "output_display_list", "inspector_display_list", ];
global.node_data_filter = ds_map_create();
for( var i = 0, n = array_length(_filter); i < n; i++ )
global.node_data_filter[? _filter[i]] = 1;
@ -16,14 +9,13 @@ function __node_data_clone(struct) {
var _str = {};
for( var i = 0, n = array_length(_var); i < n; i++ ) {
if(ds_map_exists(global.node_data_filter, _var[i])) continue;
if(!ds_map_exists(global.node_data_filter, _var[i])) continue;
var val = struct[$ _var[i]];
if(is_struct(val)) continue;
if(is_array(val)) {
for( var j = 0; j < array_length(val); j++ ) {
if(is_struct(val[j]))
val[j] = __node_data_clone(val[j]);
if(is_struct(val[j])) val[j] = __node_data_clone(val[j]);
}
}
@ -54,9 +46,13 @@ function Panel_Node_Data_Gen() : PanelContent() constructor {
game_set_speed(99999, gamespeed_fps);
function drawContent(panel) {
var _n = ALL_NODES[? key];
var _b = _n.build(0, 0);
key = ds_map_find_next(ALL_NODES, key);
draw_clear_alpha(COLORS.panel_bg_clear, 0);
draw_set_text(f_p0, fa_center, fa_top, COLORS._main_text);
draw_text(w / 2, ui(8), cur + 2 < amo? "Dumping node data... (Program terminate on complete)" : "Writing JSON");
draw_text_add(w / 2, ui(8), cur + 2 < amo? $"Dumping node data [{key}]" : "Writing JSON");
var bx0 = ui(8);
var by0 = ui(40);
@ -69,10 +65,6 @@ function Panel_Node_Data_Gen() : PanelContent() constructor {
draw_sprite_stretched(THEME.progress_bar, 0, bx0, by0, bw, bh);
draw_sprite_stretched(THEME.progress_bar, 1, bx0, by0, bw * cur / amo, bh);
var _n = ALL_NODES[? key];
var _b = _n.build(0, 0);
key = ds_map_find_next(ALL_NODES, key);
if(_b.name == "") return;
var _data = __node_data_clone(_b);
@ -91,6 +83,7 @@ function Panel_Node_Data_Gen() : PanelContent() constructor {
for( var i = 0; i < ds_list_size(_b.inputs); i++ ) {
_din[i] = __node_data_clone(_b.inputs[| i]);
var _in = _b.inputs[| i];
if(!is_instanceof(_in, NodeValue)) continue;
_jin[i] = {
type: _in.type,
@ -112,19 +105,21 @@ function Panel_Node_Data_Gen() : PanelContent() constructor {
for( var i = 0; i < ds_list_size(_b.outputs); i++ ) {
_dot[i] = __node_data_clone(_b.outputs[| i]);
var _ot = _b.outputs[| i];
if(!is_instanceof(_ot, NodeValue)) continue;
_jot[i] = {
type: _b.outputs[| i].type,
visible: _b.outputs[| i].visible? 1 : 0,
type: _ot.type,
visible: _ot.visible? 1 : 0,
};
_lot[i] = {
name: _b.outputs[| i]._initName,
tooltip: _b.outputs[| i].tooltip,
name: _ot._initName,
tooltip: _ot.tooltip,
};
}
nodeDelete(_b);
try { nodeDelete(_b); } catch(e) {}
_junc.inputs = _jin;
_junc.outputs = _jot;