From d8327d1b72407548baa765e7ed22f549129e8b0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Sat, 22 Jan 2022 22:20:41 +0100 Subject: [PATCH] Apply suggestions from code review Fixing missing return attribute in doc --- docs/maps/api-player.md | 2 +- front/src/Phaser/Game/GameScene.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/maps/api-player.md b/docs/maps/api-player.md index 6480d60a..442661bf 100644 --- a/docs/maps/api-player.md +++ b/docs/maps/api-player.md @@ -175,7 +175,7 @@ WA.player.state.toto //will retrieve the variable ### Move player to position ```typescript -WA.player.moveTo(x: number, y: number, speed?: number): Promise<{ x: number, y: number }>; +WA.player.moveTo(x: number, y: number, speed?: number): Promise<{ x: number, y: number, cancelled: boolean }>; ``` Player will try to find shortest path to the destination point and proceed to move there. ```typescript diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index 739e195d..05c0483f 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -1462,7 +1462,6 @@ ${escapedMessage} }); iframeListener.registerAnswerer("movePlayerTo", async (message) => { - // TODO: walk player to position, wait for promise to resolve const index = this.getGameMap().getTileIndexAt(message.x, message.y); const startTile = this.getGameMap().getTileIndexAt(this.CurrentPlayer.x, this.CurrentPlayer.y); const path = await this.getPathfindingManager().findPath(startTile, index, true, true);