Merge pull request #304 from JustAGenericUsername/main

This commit is contained in:
slweeb 2024-01-25 20:58:08 -05:00 committed by GitHub
commit 834104bd10
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 18 additions and 0 deletions

View File

@ -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,
}