fix: Cleans up AI Pathfinding code to make it more portable for custom requirements. (#2474)

This commit is contained in:
Kamron Batman 2026-06-07 13:25:10 -07:00 • committed by GitHub
parent 412a71dfe0
commit 30fec7da26
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 198 additions and 102 deletions

View file

@ -5,6 +5,7 @@ using System.Threading;
using Server.Items;
using Server.Misc;
using Server.Movement;
using Server.PathAlgorithms;
using Server.Tests.Maps;
namespace Server.Tests;
@ -56,6 +57,12 @@ internal static class TestServerInitializer
Server.Network.NetState.Configure();
TestMapDefinitions.ConfigureTestMapDefinitions();
// Production runs every static Configure() via AssemblyHandler.Invoke("Configure");
// the fixture calls a curated subset, so configure the pathfinding singleton here so
// BitmapAStarAlgorithm.Instance carries its configured MaxSearchNodes before any test
// calls Find. ServerConfiguration is already loaded above, so the setting resolves.
BitmapAStarAlgorithm.Configure();
World.Configure();
Timer.Init(0);
RaceDefinitions.Configure();