Update aChefsDream.js

This commit is contained in:
SquareScreamYT 2024-04-02 20:20:32 +08:00 committed by GitHub
parent 5d454d19e7
commit 835d5f3328
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 5 deletions

View File

@ -7055,7 +7055,7 @@ elements.burnt_marshmallow = {
density: 959.97,
hidden:true
}
eLists.FOODCOLORINGIGNORE = ["glass", "porcelain", "wall","iron","steel","copper","silver","aluminum","tungsten","gold","plastic"];
elements.food_coloring = {
color: ["#ff0000", "#ff8800", "#ffff00", "#00ff00", "#00ffff", "#0000ff", "#ff00ff"],
behavior: behaviors.LIQUID,
@ -7083,10 +7083,12 @@ elements.food_coloring = {
}
else {
if (!outOfBounds(pixelMap[x][y])) {
let newrgb2 = interpolateRgb(getRGB(pixel.color), getRGB(pixelMap[x][y].color), 0.9);
pixelMap[x][y].color = `rgb(${parseInt(newrgb2.r)},${parseInt(newrgb2.g)},${parseInt(newrgb2.b)})`;
if (Math.random() < 0.002) {
deletePixel(pixel.x,pixel.y)
if (!eLists.FOODCOLORINGIGNORE.includes(pixelMap[x][y].element)) {
let newrgb2 = interpolateRgb(getRGB(pixel.color), getRGB(pixelMap[x][y].color), 0.9);
pixelMap[x][y].color = `rgb(${parseInt(newrgb2.r)},${parseInt(newrgb2.g)},${parseInt(newrgb2.b)})`;
if (Math.random() < 0.002) {
deletePixel(pixel.x,pixel.y)
}
}
}
}