Steam mod compatibility
This commit is contained in:
parent
f1f025ae9f
commit
5a81639292
|
|
@ -4,9 +4,11 @@ let finalEraseElement = null;
|
||||||
elements.element_eraser = {
|
elements.element_eraser = {
|
||||||
color: "#eeeeee",
|
color: "#eeeeee",
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
var answer = prompt("Please input the element you wish to delete. It will not work if you enter multiple element types while paused.",(finalEraseElement||undefined));
|
promptInput("Please input the element you wish to delete. It will not work if you enter multiple element types while paused.", (answer) => {
|
||||||
|
// var answer = prompt("Please input the element you wish to delete. It will not work if you enter multiple element types while paused.",(finalEraseElement||undefined));
|
||||||
if (!answer) { return }
|
if (!answer) { return }
|
||||||
finalEraseElement = mostSimilarElement(answer);
|
finalEraseElement = mostSimilarElement(answer);
|
||||||
|
}, "Delete Element")
|
||||||
},
|
},
|
||||||
tool: function(pixel) {
|
tool: function(pixel) {
|
||||||
if (pixel.element === finalEraseElement) {
|
if (pixel.element === finalEraseElement) {
|
||||||
|
|
@ -21,9 +23,11 @@ let finalEraseElement2 = null;
|
||||||
elements.exclusive_element_eraser = {
|
elements.exclusive_element_eraser = {
|
||||||
color: "#eeeeee",
|
color: "#eeeeee",
|
||||||
onSelect: function() {
|
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));
|
promptInput("Please input the element you do not wish to delete. It will not work if you enter multiple element types while paused.", (answer2) => {
|
||||||
|
// var answer2 = 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 }
|
if (!answer2) { return }
|
||||||
finalEraseElement2 = mostSimilarElement(answer2);
|
finalEraseElement2 = mostSimilarElement(answer2);
|
||||||
|
}, "Don't Delete")
|
||||||
},
|
},
|
||||||
tool: function(pixel) {
|
tool: function(pixel) {
|
||||||
if (pixel.element != finalEraseElement2) {
|
if (pixel.element != finalEraseElement2) {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,8 @@ document.addEventListener("keydown", function(e) { //replace prompt listener
|
||||||
});
|
});
|
||||||
|
|
||||||
function replaceElementPrompt() {
|
function replaceElementPrompt() {
|
||||||
var fromElement = prompt("Enter the element you want to change");
|
promptInput("Enter the element you want to change", (fromElement) => {
|
||||||
|
// var fromElement = prompt("Enter the element you want to change");
|
||||||
// replace spaces with underscores
|
// replace spaces with underscores
|
||||||
fromElement = fromElement.replace(/ /g, "_");
|
fromElement = fromElement.replace(/ /g, "_");
|
||||||
fromElementS = mostSimilarElement(fromElement);
|
fromElementS = mostSimilarElement(fromElement);
|
||||||
|
|
@ -19,7 +20,8 @@ function replaceElementPrompt() {
|
||||||
fromElementS = "rock";
|
fromElementS = "rock";
|
||||||
};
|
};
|
||||||
|
|
||||||
var toElement = prompt("Enter what you want to replace \"" + fromElementS + "\" with");
|
promptInput("Enter what you want to replace \"" + fromElementS + "\" with", (toElement) => {
|
||||||
|
// var toElement = prompt("Enter what you want to replace \"" + fromElementS + "\" with");
|
||||||
// replace spaces with underscores
|
// replace spaces with underscores
|
||||||
toElement = toElement.replace(/ /g, "_");
|
toElement = toElement.replace(/ /g, "_");
|
||||||
toElementS = mostSimilarElement(toElement);
|
toElementS = mostSimilarElement(toElement);
|
||||||
|
|
@ -30,6 +32,8 @@ function replaceElementPrompt() {
|
||||||
replaceFrom = fromElementS;
|
replaceFrom = fromElementS;
|
||||||
replaceTo = toElementS;
|
replaceTo = toElementS;
|
||||||
updateReplaceDescriptions();
|
updateReplaceDescriptions();
|
||||||
|
},"Replace With")
|
||||||
|
},"Replace Element")
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateReplaceDescriptions() {
|
function updateReplaceDescriptions() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue