added superdupercooler

and fixed off-by-one errors
This commit is contained in:
Lily-129 2022-01-26 08:16:30 -05:00 committed by GitHub
parent f8a0d95f73
commit 0f6d30fe82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 2 deletions

View File

@ -372,8 +372,8 @@ elements.vaporized_estradiol = {
elements.superduperheater = {
color: "#ff0000",
tick: function(pixel) {
for (let i = -4; i < 4; i++) {
for (let j = -4; j < 4; j++) {
for (let i = -4; i < 5; i++) {
for (let j = -4; j < 5; j++) {
if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) {
pixelMap[pixel.x+j][pixel.y+i].temp += 15
}
@ -385,6 +385,22 @@ elements.superduperheater = {
state: "solid",
},
elements.superdupercooler = {
color: "#0000ff",
tick: function(pixel) {
for (let i = -4; i < 5; i++) {
for (let j = -4; j < 5; j++) {
if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) {
pixelMap[pixel.x+j][pixel.y+i].temp < -258 ? pixelMap[pixel.x+j][pixel.y+i].temp = -273 : pixelMap[pixel.x+j][pixel.y+i].temp -= 15
}
}
}
},
category:"machines",
insulate:true,
state: "solid",
},
elements.tempinccheck = {
color: "#000000",
tick: function(pixel) {