From d7ce7a2adf2204d1385d34a25a53662b232ff260 Mon Sep 17 00:00:00 2001 From: Gimlao Date: Fri, 31 Jan 2020 23:07:54 +0100 Subject: [PATCH] Update draw.js Fixed the non working orientation and palette feature. --- contrib/craftscripts/draw.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/craftscripts/draw.js b/contrib/craftscripts/draw.js index bc78843b..fb7e4f05 100644 --- a/contrib/craftscripts/draw.js +++ b/contrib/craftscripts/draw.js @@ -133,12 +133,12 @@ context.checkArgs(1, 3, " "); var f = context.getSafeOpenFile("drawings", argv[1], "png", ["png", "jpg", "jpeg", "bmp"]); var sess = context.remember(); -var upright = argv[2] === "v"; +var upright = argv[2] == "v"; var colors = clothColors; -if(argv[3] === "opt") { +if(argv[3] == "opt") { colors = clothColorsOpt; player.print("Using optimized palette"); -} else if(argv[3] === "optHD") { +} else if(argv[3] == "optHD") { colors = clothColorsOptHD; player.print("Using optimized HD palette"); } @@ -165,4 +165,4 @@ if (!f.exists()) { } } } -} \ No newline at end of file +}