1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Minor fixes and add save button

This commit is contained in:
tobspr
2020-05-14 22:05:06 +02:00
parent b01d38e55d
commit 330c98267a
8 changed files with 47 additions and 21 deletions

View File

@@ -165,7 +165,7 @@ export class InGameState extends GameState {
return;
}
this.stageLeavingGame();
this.doSave(false, true).then(() => {
this.doSave().then(() => {
this.stageDestroyed();
this.moveToState(stateId, payload);
});
@@ -424,6 +424,7 @@ export class InGameState extends GameState {
// First update the game data
logger.log("Starting to save game ...");
this.core.root.signals.gameSaved.dispatch();
this.savegame.updateData(this.core.root);
return this.savegame.writeSavegameAndMetadata().catch(err => {
logger.warn("Failed to save:", err);