From 14411abbac359b43c6532541aa1996570ad1681d Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Sat, 14 Oct 2023 20:28:27 -0400 Subject: [PATCH] Update velocity.js --- mods/velocity.js | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/mods/velocity.js b/mods/velocity.js index 53dbaf1c..d31a083c 100644 --- a/mods/velocity.js +++ b/mods/velocity.js @@ -198,26 +198,8 @@ explodeAt = function(x,y,radius,fire="fire") { continue; } else if (damage > 0.25) { - if (info.breakInto) { - // if it is an array, choose a random item, else just use the value - if (Array.isArray(info.breakInto)) { - var result = info.breakInto[Math.floor(Math.random() * info.breakInto.length)]; - } - else { - var result = info.breakInto; - } - // change the pixel to the result - changePixel(pixel,result); - continue; - } - else { - if (Array.isArray(fire)) { - var newfire = fire[Math.floor(Math.random() * fire.length)]; - } - else { - var newfire = fire; - } - changePixel(pixel,newfire); + if (info.breakInto !== undefined) { + breakPixel(pixel); continue; } }