fix: Cleans up AI Pathfinding code to make it more portable for custom requirements. (#2474)
This commit is contained in:
parent
412a71dfe0
commit
30fec7da26
16 changed files with 198 additions and 102 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue