From 6fb1eb6a6fe0f3f4c2f4e9d7fc476566168eba5d Mon Sep 17 00:00:00 2001 From: Matheus Date: Sun, 17 Aug 2025 20:03:46 -0300 Subject: Refactor --- scripts/actors/actions/MovementAction.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'scripts/actors/actions') diff --git a/scripts/actors/actions/MovementAction.cs b/scripts/actors/actions/MovementAction.cs index f29e2e8..8d864bd 100644 --- a/scripts/actors/actions/MovementAction.cs +++ b/scripts/actors/actions/MovementAction.cs @@ -13,9 +13,7 @@ public partial class MovementAction : Action { Vector2I finalDestination = actor.GridPosition + Offset; - TileData tile = game.Dungeon.GetCellTileData(finalDestination); - - if (tile == null || !(bool) tile.GetCustomData("isWalkable")) return; + if (!game.Map.IsTileWalkable(finalDestination)) return; actor.Walk(Offset); } -- cgit v1.2.3