Skip to content

Commit

Permalink
Merge branch 'CursedSliver:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
hellopir2 authored Sep 21, 2024
2 parents bf5dc5e + 7aafa55 commit e67ff1a
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -824,9 +824,19 @@ function init() {
updateEffects();
});

document.getElementById("clear").addEventListener("click", function() {
for (let i=0; i<plot.length; i++) {
plot[i].setPlant(null, true);
document.getElementById("clear").addEventListener("click", function(e) {
if (e.shiftKey) {
let hasNulls = false;
for (let i=0; i<plot.length; i++) {
if (plot[i].isNull) { hasNulls = true; }
}
for (let i=0; i<plot.length; i++) {
plot[i].setNull(!hasNulls);
}
} else {
for (let i=0; i<plot.length; i++) {
plot[i].setPlant(null, true);
}
}

updateStats();
Expand Down

0 comments on commit e67ff1a

Please sign in to comment.