exclusive eraser

This commit is contained in:
SquareScreamYT 2024-03-26 08:43:05 +08:00 committed by GitHub
parent d997575daf
commit e21476ac59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 18 additions and 1 deletions

View File

@ -15,5 +15,22 @@ elements.element_eraser = {
},
category: "tools",
excludeRandom: true,
desc: "Input a element to erase only that element."
desc: "Use on pixels to delete specified element."
}
let finalEraseElement2 = null;
elements.exclusive_element_eraser = {
color: "#eeeeee",
onSelect: function() {
var answer = prompt("Please input the element you do not wish to delete. It will not work if you enter multiple element types while paused.",(finalEraseElement2||undefined));
if (!answer2) { return }
finalEraseElement2 = mostSimilarElement(answer2);
},
tool: function(pixel) {
if (pixel.element != finalEraseElement2) {
deletePixel(pixel.x,pixel.y)
}
},
category: "tools",
excludeRandom: true,
desc: "Use on pixels to delete any element except the specified element."
}