diff --git a/src/js/game/camera.js b/src/js/game/camera.js index b6fcebb5..e15fd156 100644 --- a/src/js/game/camera.js +++ b/src/js/game/camera.js @@ -943,7 +943,7 @@ export class Camera extends BasicSerializableObject { ) ); - this.clampPosition(this.center) + this.clampPosition(this.center); } /** diff --git a/src/js/game/hud/hud.js b/src/js/game/hud/hud.js index 5f731d1f..8df5c703 100644 --- a/src/js/game/hud/hud.js +++ b/src/js/game/hud/hud.js @@ -181,7 +181,7 @@ export class GameHUD { continue; } - this.parts[key] = new Part(this.root); + this.parts[key] = new Part(this.root); } } diff --git a/src/js/game/modes/puzzle.js b/src/js/game/modes/puzzle.js index ed58f850..de3920e1 100644 --- a/src/js/game/modes/puzzle.js +++ b/src/js/game/modes/puzzle.js @@ -30,9 +30,9 @@ export class PuzzleGameMode extends GameMode { this.type = this.getType(); this.hiddenHudParts = data.hiddenHudParts || this.getDefaultHiddenHudParts(); -// this.excludedHudParts = data.hiddenHudParts || this.getDefaultHiddenHudParts(); - this.zoneHeight = data.zoneHeight || (3 * globalConfig.tileSize); - this.zoneWidth = data.zoneWidth || (4 * globalConfig.tileSize); + // this.excludedHudParts = data.hiddenHudParts || this.getDefaultHiddenHudParts(); + this.zoneHeight = data.zoneHeight || 3 * globalConfig.tileSize; + this.zoneWidth = data.zoneWidth || 4 * globalConfig.tileSize; this.boundaryHeight = this.zoneHeight * 2; this.boundaryWidth = this.zoneWidth * 2; } @@ -49,7 +49,7 @@ export class PuzzleGameMode extends GameMode { getDefaultHiddenHudParts() { return { - [HUDPinnedShapes.name]: true + [HUDPinnedShapes.name]: true, }; } diff --git a/src/js/savegame/schemas/1009.js b/src/js/savegame/schemas/1009.js index 838f1bd9..e6e1abc6 100644 --- a/src/js/savegame/schemas/1009.js +++ b/src/js/savegame/schemas/1009.js @@ -27,8 +27,8 @@ export class SavegameInterface_V1009 extends SavegameInterface_V1008 { dump.gameMode = { mode: { id: RegularGameMode.getId(), - data: {} - } + data: {}, + }, }; } } diff --git a/src/js/states/ingame.js b/src/js/states/ingame.js index 9ba3aa3d..34f360e3 100644 --- a/src/js/states/ingame.js +++ b/src/js/states/ingame.js @@ -39,6 +39,9 @@ export class GameCreationPayload { /** @type {boolean|undefined} */ this.fastEnter; + /** @type {string} */ + this.gameModeId; + /** @type {Savegame} */ this.savegame; } diff --git a/src/js/states/main_menu.js b/src/js/states/main_menu.js index 24c33b5f..e5f9c20b 100644 --- a/src/js/states/main_menu.js +++ b/src/js/states/main_menu.js @@ -317,11 +317,7 @@ export class MainMenuState extends GameState { const bottomButtonContainer = this.htmlElement.querySelector(".bottomContainer .buttons"); removeAllChildren(bottomButtonContainer); - const puzzleModeButton = makeButton( - bottomButtonContainer, - ["styledButton"], - T.mainMenu.puzzleMode - ); + const puzzleModeButton = makeButton(bottomButtonContainer, ["styledButton"], T.mainMenu.puzzleMode); bottomButtonContainer.appendChild(puzzleModeButton); this.trackClicks(puzzleModeButton, this.onPuzzleModeButtonClicked); @@ -337,10 +333,7 @@ export class MainMenuState extends GameState { const buttonContainer = this.htmlElement.querySelector(".mainContainer .buttons"); removeAllChildren(buttonContainer); - const playButtonElement = makeButtonElement( - ["playButton", "styledButton"], - T.mainMenu.play - ); + const playButtonElement = makeButtonElement(["playButton", "styledButton"], T.mainMenu.play); buttonContainer.appendChild(playButtonElement); this.trackClicks(playButtonElement, this.onPuzzlePlayButtonClicked); @@ -348,11 +341,7 @@ export class MainMenuState extends GameState { const bottomButtonContainer = this.htmlElement.querySelector(".bottomContainer .buttons"); removeAllChildren(bottomButtonContainer); - const backButton = makeButton( - bottomButtonContainer, - ["styledButton"], - T.mainMenu.back - ); + const backButton = makeButton(bottomButtonContainer, ["styledButton"], T.mainMenu.back); bottomButtonContainer.appendChild(backButton); this.trackClicks(backButton, this.onBackButtonClicked);