Merge pull request #700 from redbirdly/main

small bug fix with glowItsOwnColorIfPowered()
This commit is contained in:
slweeb 2024-06-20 22:04:51 -04:00 committed by GitHub
commit 119b8dd0d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 2 deletions

View File

@ -0,0 +1,6 @@
elements.water.behavior = [
"XX|XX|XX",
"M2%5|XX|M2 AND BO",
"XX|M1|M2",
];
elements.water.flippableX = true;

View File

@ -181,7 +181,7 @@ function glowItsOwnColor(pixel) {
}
function glowItsOwnColorIfPowered(pixel) {
if (pixel.charge <= 0) {return;}
if (!pixel.charge || pixel.charge <= 0) {return;}
if (!pixel.color) return;
var x = Math.floor(pixel.x / lightmapScale);
var y = Math.floor(pixel.y / lightmapScale);

View File

@ -181,7 +181,7 @@ function glowItsOwnColor(pixel) {
}
function glowItsOwnColorIfPowered(pixel) {
if (pixel.charge <= 0) {return;}
if (!pixel.charge || pixel.charge <= 0) {return;}
if (!pixel.color) return;
var x = Math.floor(pixel.x / lightmapScale);
var y = Math.floor(pixel.y / lightmapScale);