From 107e3404e8fae3a83527fad979b1c33f0c8cb8de Mon Sep 17 00:00:00 2001 From: Rutherther Date: Sat, 31 Dec 2022 01:13:17 +0100 Subject: [PATCH] fix(pathfinding): return custom PathNotFoundError instead of NotFoundError --- Extensions/NosSmooth.Extensions.Pathfinding/Pathfinder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extensions/NosSmooth.Extensions.Pathfinding/Pathfinder.cs b/Extensions/NosSmooth.Extensions.Pathfinding/Pathfinder.cs index 74ed04ba28c68e600acbc08966d8f14adf2a5187..f29412bf23bdbab3c16ac1f4b13d1fe70f84e286 100644 --- a/Extensions/NosSmooth.Extensions.Pathfinding/Pathfinder.cs +++ b/Extensions/NosSmooth.Extensions.Pathfinding/Pathfinder.cs @@ -92,7 +92,7 @@ public class Pathfinder { if (!mapInfo.IsWalkable(targetX, targetY)) { - return new NotFoundError("The requested target is not walkable, path cannot be found."); + return new PathNotFoundError(targetX, targetY); } if (x == targetX && y == targetY)