Skip to content

Commit

Permalink
navmesh update
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaksuhn committed Mar 4, 2024
1 parent 4c66ebf commit fe589d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 5 additions & 5 deletions SomethingNeedDoing/IPC/navmesh.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ internal class NavmeshIPC
private static ICallGateSubscriber<float>? _pathGetTolerance;
private static ICallGateSubscriber<float, object>? _pathSetTolerance;

private static ICallGateSubscriber<Vector3, bool, object>? _pathfindAndMoveTo;
private static ICallGateSubscriber<Vector3, bool, bool>? _pathfindAndMoveTo;
private static ICallGateSubscriber<bool>? _pathfindInProgress;

internal static void Init()
Expand Down Expand Up @@ -60,7 +60,7 @@ internal static void Init()
_pathGetTolerance = Service.Interface.GetIpcSubscriber<float>($"{Name}.Path.GetTolerance");
_pathSetTolerance = Service.Interface.GetIpcSubscriber<float, object>($"{Name}.Path.SetTolerance");

_pathfindAndMoveTo = Service.Interface.GetIpcSubscriber<Vector3, bool, object>($"{Name}.SimpleMove.PathfindAndMoveTo");
_pathfindAndMoveTo = Service.Interface.GetIpcSubscriber<Vector3, bool, bool>($"{Name}.SimpleMove.PathfindAndMoveTo");
_pathfindInProgress = Service.Interface.GetIpcSubscriber<bool>($"{Name}.SimpleMove.PathfindInProgress");
}
catch (Exception ex) { ex.Log(); }
Expand Down Expand Up @@ -107,8 +107,8 @@ internal static void Execute<T1, T2>(Action<T1, T2> action, T1 p1, T2 p2)

internal static bool NavIsReady() => Execute(() => _navIsReady!.InvokeFunc());
internal static float NavBuildProgress() => Execute(() => _navBuildProgress!.InvokeFunc());
internal static void NavReload() => Execute(_navReload!.InvokeAction);
internal static void NavRebuild() => Execute(_navRebuild!.InvokeAction);
internal static void NavReload() => Execute(() => _navReload!.InvokeFunc());
internal static void NavRebuild() => Execute(() => _navRebuild!.InvokeFunc());
internal static Task<List<Vector3>>? NavPathfind(Vector3 from, Vector3 to, bool fly = false) => Execute(() => _navPathfind!.InvokeFunc(from, to, fly));
internal static bool NavIsAutoLoad() => Execute(() => _navIsAutoLoad!.InvokeFunc());
internal static void NavSetAutoLoad(bool value) => Execute(_navSetAutoLoad!.InvokeAction, value);
Expand All @@ -127,7 +127,7 @@ internal static void Execute<T1, T2>(Action<T1, T2> action, T1 p1, T2 p2)
internal static float PathGetTolerance() => Execute(() => _pathGetTolerance!.InvokeFunc());
internal static void PathSetTolerance(float tolerance) => Execute(_pathSetTolerance!.InvokeAction, tolerance);

internal static void PathfindAndMoveTo(Vector3 pos, bool fly) => Execute(_pathfindAndMoveTo!.InvokeAction, pos, fly);
internal static void PathfindAndMoveTo(Vector3 pos, bool fly) => Execute(() => _pathfindAndMoveTo!.InvokeFunc(pos, fly));
internal static bool PathfindInProgress() => Execute(() => _pathfindInProgress!.InvokeFunc());
}

4 changes: 3 additions & 1 deletion SomethingNeedDoing/Interface/HelpWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,9 @@ static void DisplayChangelog(string date, string changes, bool separator = true)
"- Added LogInfo()\n" +
"- Added LogDebug()\n" +
"- Added LogVerbose()\n" +
"- Added counter node support to GetNodeText()\n");
"- Added counter node support to GetNodeText()\n" +
"- Navmesh ipc fixes\n" +
"- Added support for require() to require other macros (thanks kurenaj!)\n");

DisplayChangelog(
"2024-03-03",
Expand Down

0 comments on commit fe589d4

Please sign in to comment.