From 77094556156cd55d8a92d89df5929ec9f43f0492 Mon Sep 17 00:00:00 2001 From: JustAGenericUsername <92590792+JustAGenericUsername@users.noreply.github.com> Date: Thu, 14 Dec 2023 14:20:47 -0500 Subject: [PATCH 1/2] Update nousersthings.js --- mods/nousersthings.js | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/mods/nousersthings.js b/mods/nousersthings.js index fbe87a9c..c4f5c607 100644 --- a/mods/nousersthings.js +++ b/mods/nousersthings.js @@ -1254,7 +1254,7 @@ elements.heat_test = { if (pixel.ctemp <= 0.5){ pixel.newR = (((510-(2*pixel.ogR))*pixel.ctemp)+pixel.ogR); pixel.newG = ((0-((2*pixel.ogG)*pixel.ctemp))+pixel.ogG); - pixel.newB = ((0-((2*pixel.ogB)*pixel.ctemp))+pixel.ogB); + pixel.newB = ((0-((5*pixel.ogB)*pixel.ctemp))+pixel.ogB); }else if (pixel.ctemp > 0.5){ pixel.newR = 255; pixel.newG = ((510*pixel.ctemp)-256); @@ -1268,8 +1268,6 @@ elements.soup = { color: "#3d2812", behavior: behaviors.LIQUID, category: "food", - tempHigh: 100, - stateHigh: "steam", onMix: function(soup,ingredient) { if (elements[ingredient.element].isFood && elements[ingredient.element].id !== elements.soup.id && elements[ingredient.element].id !== elements.broth.id) { var rgb1 = soup.color.match(/\d+/g); @@ -1280,7 +1278,13 @@ elements.soup = { Math.round((parseInt(rgb1[1])+parseInt(rgb2[1]))/2), Math.round((parseInt(rgb1[2])+parseInt(rgb2[2]))/2) ]; - changePixel(ingredient, "soup") + if (!soup.elemlist){ + soup.elemlist = []; + } + soup.decidedHigh = soup.elemlist[Math.floor(Math.random()*soup.elemlist.length)]; + soup.elemlist.push(ingredient.element) + soup.stateHigh = soup.elemlist; + changePixel(ingredient, "soup"); // convert rgb to hex var hex = RGBToHex(rgb); soup.color = pixelColorPick(soup, hex); @@ -1291,26 +1295,22 @@ elements.soup = { } } }, + tick: function(pixel) { + if (!pixel.decidedHigh){ + pixel.decidedHigh = "steam"; + } + if (pixel.temp > 100){ + if (Math.random() < 0.5) { + changePixel(pixel, "steam"); + } else { + changePixel(pixel, pixel.decidedHigh) + } + } + }, density: 1100, stain: 0.02, state: "liquid", }, elements.broth.onMix = function(pixel){ changePixel(pixel, "soup") -}//, -//elements.portal_in = { -// color: "#FFA000", -// behavior: behaviors.WALL, -// tick: function(pixel) { -// }, -// category: "machines", -// state: "solid", -//}, -//elements.portal_out = { -// color: "#0000FF", -// behavior: behaviors.WALL, -// tick: function(pixel) { -// }, -// category: "machines", -// state: "solid", -//} +} From 4338f79fafd0ff5b66779f80e5985923fe76183c Mon Sep 17 00:00:00 2001 From: JustAGenericUsername <92590792+JustAGenericUsername@users.noreply.github.com> Date: Thu, 14 Dec 2023 14:24:02 -0500 Subject: [PATCH 2/2] Update nousersthings.js --- mods/nousersthings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/nousersthings.js b/mods/nousersthings.js index c4f5c607..48593797 100644 --- a/mods/nousersthings.js +++ b/mods/nousersthings.js @@ -1254,7 +1254,7 @@ elements.heat_test = { if (pixel.ctemp <= 0.5){ pixel.newR = (((510-(2*pixel.ogR))*pixel.ctemp)+pixel.ogR); pixel.newG = ((0-((2*pixel.ogG)*pixel.ctemp))+pixel.ogG); - pixel.newB = ((0-((5*pixel.ogB)*pixel.ctemp))+pixel.ogB); + pixel.newB = ((0-((2*pixel.ogB)*pixel.ctemp))+pixel.ogB); }else if (pixel.ctemp > 0.5){ pixel.newR = 255; pixel.newG = ((510*pixel.ctemp)-256);