From 1f4a67d126b4b526048613ab55ca16601ef88628 Mon Sep 17 00:00:00 2001 From: Tanasart Date: Fri, 5 Jul 2024 17:58:46 +0700 Subject: [PATCH] 1.17.6 --- .../canvas_tool_brush_shape_iso.gml | 12 +++++++++++- scripts/globals/globals.gml | 2 +- scripts/node_canvas/node_canvas.gml | 13 ++++++------- scripts/node_displace/node_displace.gml | 5 +++-- scripts/node_tool/node_tool.gml | 2 +- 5 files changed, 22 insertions(+), 12 deletions(-) diff --git a/scripts/canvas_tool_brush_shape_iso/canvas_tool_brush_shape_iso.gml b/scripts/canvas_tool_brush_shape_iso/canvas_tool_brush_shape_iso.gml index 93b8027a3..3e9663eb4 100644 --- a/scripts/canvas_tool_brush_shape_iso/canvas_tool_brush_shape_iso.gml +++ b/scripts/canvas_tool_brush_shape_iso/canvas_tool_brush_shape_iso.gml @@ -92,12 +92,22 @@ function canvas_draw_iso_cube(brush, _p, _fill = false) { var p1x = _p[1][0], p1y = _p[1][1]; var ww = p1x - p0x; + var cc = draw_get_color(); + if(p1x < p0x) { var tx = p0x, ty = p0y; p0x = p1x; p0y = p1y; p1x = tx; p1y = ty; } + if(p1x == p0x && p1y > p0y) { + var t = p0y; + p0y = p1y; + p1y = t; + } + + if(p1x == p0x && p1y < p0y) p1x++; + var d = _p[2]; var w = p1x - p0x + 1; var h = p0y - p1y; @@ -112,9 +122,9 @@ function canvas_draw_iso_cube(brush, _p, _fill = false) { var p1py = p1y - h1; var _simp = true; - var cc = draw_get_color(); if(w > 0) { + if(round(h2) < 0) { if(round(w1) > 0) { diff --git a/scripts/globals/globals.gml b/scripts/globals/globals.gml index 0a9c2d648..befeebba2 100644 --- a/scripts/globals/globals.gml +++ b/scripts/globals/globals.gml @@ -38,7 +38,7 @@ LATEST_VERSION = 11700; VERSION = 11760; SAVE_VERSION = 11700; - VERSION_STRING = "1.17.6.007"; + VERSION_STRING = "1.17.6"; BUILD_NUMBER = 11760; globalvar HOTKEYS, HOTKEY_CONTEXT; diff --git a/scripts/node_canvas/node_canvas.gml b/scripts/node_canvas/node_canvas.gml index 77d5e2d46..1c53cd331 100644 --- a/scripts/node_canvas/node_canvas.gml +++ b/scripts/node_canvas/node_canvas.gml @@ -276,8 +276,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor tool_curve_cancel = button( function() { tool_curve_bez.cancel(); } ).setIcon(THEME.toolbar_check, 1); toolObject_selection_magic = new NodeTool( "Magic Selection", THEME.canvas_tools_magic_selection ) - .setSetting(tool_thrs) - .setSetting(tool_fil8) + .setSetting(tool_thrs, tool_fil8) .setToolObject(tool_sel_magic) tools = [ @@ -370,11 +369,11 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor /* 0 */ -1, /* 1 */ new NodeTool( "Make/Reset Brush", THEME.canvas_tools_pencil ).setToolFn( __action_make_brush ), /* 2 */ -1, - /* 3 */ new NodeTool( "Outline", THEME.canvas_tools_outline ).setToolObject( new canvas_tool_outline() ), - /* 4 */ new NodeTool( "Extrude", THEME.canvas_tools_extrude ).setToolObject( new canvas_tool_extrude() ), - /* 5 */ new NodeTool( "Inset", THEME.canvas_tools_inset ).setToolObject( new canvas_tool_inset() ), - /* 6 */ new NodeTool( "Skew", THEME.canvas_tools_skew ).setToolObject( new canvas_tool_skew() ), - /* 7 */ new NodeTool( "Corner", THEME.canvas_tools_corner ).setToolObject( new canvas_tool_corner() ), + /* 3 */ new NodeTool( "Outline", THEME.canvas_tools_outline ).setSetting(tool_thrs, tool_fil8).setToolObject( new canvas_tool_outline() ), + /* 4 */ new NodeTool( "Extrude", THEME.canvas_tools_extrude ).setSetting(tool_thrs, tool_fil8).setToolObject( new canvas_tool_extrude() ), + /* 5 */ new NodeTool( "Inset", THEME.canvas_tools_inset ).setSetting(tool_thrs, tool_fil8).setToolObject( new canvas_tool_inset() ), + /* 6 */ new NodeTool( "Skew", THEME.canvas_tools_skew ).setSetting(tool_thrs, tool_fil8).setToolObject( new canvas_tool_skew() ), + /* 7 */ new NodeTool( "Corner", THEME.canvas_tools_corner ).setSetting(tool_thrs, tool_fil8).setToolObject( new canvas_tool_corner() ), ]; rightTools_not_selection = [ diff --git a/scripts/node_displace/node_displace.gml b/scripts/node_displace/node_displace.gml index dbea6c327..cee8ad017 100644 --- a/scripts/node_displace/node_displace.gml +++ b/scripts/node_displace/node_displace.gml @@ -16,9 +16,10 @@ function Node_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setDisplay(VALUE_DISPLAY.slider); inputs[| 5] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, @"Use color data for extra information. - - Linear: Displace along a line. + - Linear: Displace along a single line (defined by the position value). - Vector: Use red as X displacement, green as Y displacement. - - Angle: Use red as angle, green as distance.") + - Angle: Use red as angle, green as distance. + - Gradient: Displace down the brightness value defined by the Displace map.") .setDisplay(VALUE_DISPLAY.enum_button, [ "Linear", "Vector", "Angle", "Gradient" ]); inputs[| 6] = nodeValue("Iterate", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, @"If not set, then strength value is multiplied directly to the displacement. diff --git a/scripts/node_tool/node_tool.gml b/scripts/node_tool/node_tool.gml index 3752ada08..0660d143c 100644 --- a/scripts/node_tool/node_tool.gml +++ b/scripts/node_tool/node_tool.gml @@ -32,7 +32,7 @@ function NodeTool(name, spr, contextString = instanceof(other)) constructor { return new tooltipHotkey(_nme).setKey(_key.getName()); } - static setSetting = function(sets) { array_push(settings, sets); return self; } + static setSetting = function() { for(var i = 0; i < argument_count; i++) array_push(settings, argument[i]); return self; } static addSetting = function(name, type, onEdit, keyAttr, val) { var w;