commit
abea6ad7a7
|
|
@ -2784,7 +2784,7 @@ elements.ray = {
|
||||||
movable: true,
|
movable: true,
|
||||||
category: "special",
|
category: "special",
|
||||||
hoverStat: function(pixel){
|
hoverStat: function(pixel){
|
||||||
return pixel.life || "unset"
|
return pixel.life.toString() || "unset"
|
||||||
},
|
},
|
||||||
properties: {
|
properties: {
|
||||||
life: 10,
|
life: 10,
|
||||||
|
|
@ -3721,3 +3721,41 @@ elements.thin_pixel = {
|
||||||
ctx.fillRect(canvasCoord(pixel.x+0.38), canvasCoord(pixel.y+0.38), pixelSize*0.24, pixelSize*0.24);
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue