Skip to content

Commit

Permalink
fix cancel bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaytonTDM committed Mar 25, 2024
1 parent d0ca5fa commit fe52035
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion game/js/cheats.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
// when j is pressed, let the user spawn a sun at a random location
document.addEventListener("keydown", function (event) {
if (event.keyCode == 74) {
let suns = prompt("Spawn Sun", "50");
if (suns == null) {
return;
}
AppearSun(
GetX(Math.floor(1 + Math.random() * oS.C)),
GetY(Math.floor(1 + Math.random() * oS.R)),
prompt("Spawn Sun", "50"),
suns,
1
);
}
Expand Down

0 comments on commit fe52035

Please sign in to comment.