From 728128ebb05adc4a520249bc1fc7ef71f9fac47b Mon Sep 17 00:00:00 2001 From: JustAGenericUsername <92590792+JustAGenericUsername@users.noreply.github.com> Date: Sat, 6 Sep 2025 10:00:57 -0400 Subject: [PATCH] gas decay mod --- mods/gasdecay.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 mods/gasdecay.js diff --git a/mods/gasdecay.js b/mods/gasdecay.js new file mode 100644 index 00000000..11db2630 --- /dev/null +++ b/mods/gasdecay.js @@ -0,0 +1,15 @@ +let gasList = [] +runAfterLoad(function(){ + for (let _element in elements){ + if (elements[_element].state == "gas"){ + gasList.push(_element) + } + } + runPerPixel(function(pixel){ + if (gasList.indexOf(pixel.element) >= 0){ + if (Math.random() < 0.002){ + deletePixel(pixel.x, pixel.y) + } + } + }) +}) \ No newline at end of file