Merge pull request #1237 from P0gDog/main

add sensitive.js mod
This commit is contained in:
slweeb 2025-09-15 22:00:18 -04:00 committed by GitHub
commit 3802ce08b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 20 additions and 0 deletions

20
mods/sensitive.js Normal file
View File

@ -0,0 +1,20 @@
// Makes all elements EXTREAMLY sensitive to air or anything else.
runAfterLoad(function() {
for (const elem in elements) {
if (["fire", "explosion", "smoke"].includes(elem)) continue;
if (!elements[elem].onPlace) {
elements[elem].onPlace = function(pixel) {
changePixel(pixel, "explosion");
};
} else {
const oldOnPlace = elements[elem].onPlace;
elements[elem].onPlace = function(pixel) {
oldOnPlace(pixel);
changePixel(pixel, "explosion");
};
}
}
});