add sensitive mod

This commit is contained in:
PogDog 2025-09-09 16:06:41 +00:00
parent 015c94037c
commit 3adea09824
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");
};
}
}
});