From 073ae100a907496a1f6ce6f7ce1a56056adafaa9 Mon Sep 17 00:00:00 2001 From: Lily-129 <68935009+Lily-129@users.noreply.github.com> Date: Wed, 23 Feb 2022 20:06:00 -0500 Subject: [PATCH] tool to delete all of a specific element --- mods/randomness_but_tool.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/mods/randomness_but_tool.js b/mods/randomness_but_tool.js index 39762bea..674351e8 100644 --- a/mods/randomness_but_tool.js +++ b/mods/randomness_but_tool.js @@ -88,3 +88,20 @@ elements.rg3 = { excludeRandom: true, }; +elements.daoe = { + name: "delete all of element", + color: ["#a7a7a7", "#a7a7a7", "#a7a7a7", "#a7a7a7", "#000000", "#000000", "#000000", "#000000"], + tool: function(pixel) { + for (var i = 1; i < width; i++) { + for (var j = 1; j < height; j++) { + if (!isEmpty(i,j)) { + if(pixelMap[i][j].element == pixel.element) { + deletePixel(i,j) + } + } + } + } + }, + category: "tools", + excludeRandom: true, +};