This commit is contained in:
An Orbit 2023-05-07 12:00:02 -04:00 committed by GitHub
parent 40b0bf5caa
commit c868a06f77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -244,13 +244,13 @@ if(enabledMods.includes(runAfterAutogenMod) && enabledMods.includes(libraryMod))
else {
var otherPixel = pixelMap[x][y]
var otherInfo = elements[otherPixel.element];
otherPixel.temp += 400;
otherPixel.temp += (400 * (shiftDown + 1));
if(otherPixel.del) { continue };
if (!(grbBreakIntos.includes(otherPixel.element))) {
if (otherInfo.isGas) {
if(Math.random() > ((otherInfo.hardness ?? 0) ** 4)) { breakPixel(otherPixel,false,false) };
if(Math.random() > ((otherInfo.hardness ?? 0) ** (4 + shiftDown))) { breakPixel(otherPixel,false,false) };
if(hasVelocity && otherPixel && !(lightlikes.includes(otherPixel.element))) {
var vels = [randomIntegerBetweenTwoValues(-7,7),randomIntegerBetweenTwoValues(-7,7)];
var vels = [randomIntegerBetweenTwoValues(-7 - (shiftDown * 2),7 + (shiftDown * 2)),randomIntegerBetweenTwoValues(-7 - (shiftDown * 2),7 + (shiftDown * 2))];
otherPixel.vx = vels[0];
otherPixel.vy = vels[1];
};
@ -258,13 +258,13 @@ if(enabledMods.includes(runAfterAutogenMod) && enabledMods.includes(libraryMod))
};
if (otherInfo.id === elements[pixel.element].id) { break }
if(Math.random() > ((otherInfo.hardness ?? 0) ** 2)) { breakPixel(otherPixel,false,false) };
if(Math.random() > ((otherInfo.hardness ?? 0) ** (2 + shiftDown))) { breakPixel(otherPixel,false,false) };
if(hasVelocity && otherPixel) {
var vels = [randomIntegerBetweenTwoValues(-9,9),randomIntegerBetweenTwoValues(-7,0)];
var vels = [randomIntegerBetweenTwoValues(-9 - (shiftDown * 2),9 + (shiftDown * 2)),randomIntegerBetweenTwoValues(-7 - (shiftDown * 2),0 + (shiftDown * 2))];
otherPixel.vx = vels[0];
otherPixel.vy = vels[1];
};
if(Math.random() < Math.max(0.9,0.4 + ((1 - (otherInfo.hardness ?? 0)) / 2))) { //thanks, I hate random continue
if(Math.random() < ((shiftDown / 20) + (Math.max(0.9,0.4 + ((1 - (otherInfo.hardness ?? 0)) / 2))))) { //thanks, I hate random continue
continue;
};
break;