Attempting to move into tile that blocks shouldnt result in wait action

This commit is contained in:
Peter Stockings
2026-01-06 21:23:25 +11:00
parent 6e060013f7
commit 309ab19e8c
4 changed files with 73 additions and 5 deletions

View File

@@ -405,10 +405,14 @@ export class GameScene extends Phaser.Scene {
}
private commitPlayerAction(action: Action) {
const playerEvents = applyAction(this.world, this.playerId, action, this.entityManager);
if (playerEvents.some(ev => ev.type === "move-blocked")) {
return;
}
this.awaitingPlayer = false;
this.followPlayer = true;
const playerEvents = applyAction(this.world, this.playerId, action, this.entityManager);
// Check for pickups right after move (before enemy turn, so you get it efficiently)
if (action.type === "move") {