From d90a667c076a96684126aafff66b806a1ac15eca Mon Sep 17 00:00:00 2001 From: JustAGenericUsername <92590792+JustAGenericUsername@users.noreply.github.com> Date: Fri, 20 Sep 2024 06:38:28 -0400 Subject: [PATCH] h --- mods/nousersthings.js | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/mods/nousersthings.js b/mods/nousersthings.js index f0229f3a..7af6436b 100644 --- a/mods/nousersthings.js +++ b/mods/nousersthings.js @@ -2784,7 +2784,7 @@ elements.ray = { movable: true, category: "special", hoverStat: function(pixel){ - return pixel.life || "unset" + return pixel.life.toString() || "unset" }, properties: { life: 10, @@ -3720,4 +3720,42 @@ elements.thin_pixel = { ctx.fillStyle = pixel.color; ctx.fillRect(canvasCoord(pixel.x+0.38), canvasCoord(pixel.y+0.38), pixelSize*0.24, pixelSize*0.24); } +} +elements.cooler_sensor = { + color: "#5499e7", + behavior: behaviors.WALL, + category: "machines", + insulate: true, + conduct: 1, + tick: function(pixel){ + let temp = pixel.temp + for (i = 0; i < adjacentCoords.length; i++){ + let x = adjacentCoords[i][0] + pixel.x; + let y = adjacentCoords[i][1] + pixel.y; + if (!isEmpty(x, y, true)){ + if (pixelMap[x][y].temp < temp){ + pixel.charge = 1 + } + } + } + } +} +elements.hotter_sensor = { + color: "#e75454", + behavior: behaviors.WALL, + category: "machines", + insulate: true, + conduct: 1, + tick: function(pixel){ + let temp = pixel.temp + for (i = 0; i < adjacentCoords.length; i++){ + let x = adjacentCoords[i][0] + pixel.x; + let y = adjacentCoords[i][1] + pixel.y; + if (!isEmpty(x, y, true)){ + if (pixelMap[x][y].temp > temp){ + pixel.charge = 1 + } + } + } + } } \ No newline at end of file