Merge pull request #934 from therealsuss/main

elementreplacer.js is here yayayay
This commit is contained in:
slweeb 2025-01-12 20:29:49 -05:00 committed by GitHub
commit 7eb3e7237a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions

View File

@ -152,6 +152,7 @@
<tr><td>descriptions.js</td><td>Adds descriptions to the info page and tooltips of elements</td><td>mollthecoder</td></tr>
<tr><td>editTools.js</td><td>Selections, Copying, Pasting, Cutting, Shapes, and more!</td><td>ggod</td></tr>
<tr><td>elementEraser.js</td><td>Adds a tool that deletes only desired element</td><td>SquareScreamYT</td></tr>
<tr><td>elementreplacer.js</td><td>Adds a tool that replaces elements with other elements while keeping their color</td><td>Suss</td></tr>
<tr><td>elementsManager.js</td><td>Create and edit custom elements</td><td>ggod</td></tr>
<tr><td>evenmoretemptools.js</td><td>Adds different temperature-modifying tools (±350/tick, NaN, and Infinity)</td><td>Alice</td></tr>
<tr><td>extra_element_info.js</td><td>Adds descriptions to various vanilla elements. Used to provide the functionality that desc now does before it was added to vanilla</td><td>Melecie</td></tr>

12
mods/elementreplacer.js Normal file
View File

@ -0,0 +1,12 @@
elements.element_replacer = {
color: ["#ff007a", "#4625e3"],
onSelect: function(){
var answerreplace = prompt("Element to replace clicked elements with:");
if (!answerreplace) {return}
replacingelement = mostSimilarElement(answerreplace);
},
tool: function(pixel) {
pixel.element = replacingelement
},
category: "tools",
};