Add a call to restart on the exit event

This commit is contained in:
Ethan O'Brien 2025-01-05 16:13:59 -06:00
parent f0a79017e5
commit fc521d20e0

View File

@ -39,10 +39,12 @@ class EJS_GameManager {
this.initShaders();
this.EJS.on("exit", () => {
this.toggleMainLoop(0);
if (!this.EJS.failedToStart) {
this.functions.saveSaveFiles();
this.functions.restart();
this.functions.saveSaveFiles();
}
this.toggleMainLoop(0);
this.FS.unmount('/data/saves');
setTimeout(() => {
try {