From 8fa263e014cde918023d7d42d71213dbb033209b Mon Sep 17 00:00:00 2001 From: JustAGenericUsername Date: Thu, 25 Jan 2024 20:56:22 -0500 Subject: [PATCH] the toolening --- mods/logicgates.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/mods/logicgates.js b/mods/logicgates.js index 13d1b5e2..5b989a41 100644 --- a/mods/logicgates.js +++ b/mods/logicgates.js @@ -389,6 +389,7 @@ elements.logic_transmitter = { if (pixel.start === pixelTicks){ pixel.channel = transmitterVar; } + pixel.clone = pixel.channel; var receivers = currentPixels.filter(function(pixelToCheck) { return ( pixelToCheck !== pixel && //should work if this pixel is the same as the other one by reference @@ -430,5 +431,22 @@ elements.logic_receiver = { category: "logic", tick: function(pixel){ if (pixel.start === pixelTicks){pixel.channel = transmitterVar} + pixel.clone = pixel.channel; } +} +elements.logic_shock = { + color: elements.shock.color, + category: "tools", + tool: function(pixel){ + if (pixel.element == "logic_wire"){pixel.lstate = 2; pixel.color = pixelColorPick(pixel, "#ffe49c")} + }, + excludeRandom: true, +} +elements.logic_unshock = { + color: elements.uncharge.color, + category: "tools", + tool: function(pixel){ + if (pixel.element == "logic_wire"){pixel.lstate = -2; pixel.color = pixelColorPick(pixel, "#3d4d2c")} + }, + excludeRandom: true, } \ No newline at end of file