Merge branch 'R74nCom:main' into main

This commit is contained in:
Nekonico 2024-09-20 20:29:00 -07:00 committed by GitHub
commit 2848cddac6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 39 additions and 1 deletions

View File

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