Replace IResettingEntitySystem with RoundRestartCleanupEvent. (#4245)
* Replace IResettingEntitySystem with RoundRestartCleanupEvent. * oops
This commit is contained in:
committed by
GitHub
parent
16e1c2c798
commit
bc7b315b18
@@ -27,7 +27,7 @@ namespace Content.Server.AI.Pathfinding
|
||||
/// This system handles pathfinding graph updates as well as dispatches to the pathfinder
|
||||
/// (90% of what it's doing is graph updates so not much point splitting the 2 roles)
|
||||
/// </summary>
|
||||
public class PathfindingSystem : EntitySystem, IResettingEntitySystem
|
||||
public class PathfindingSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||
@@ -201,6 +201,7 @@ namespace Content.Server.AI.Pathfinding
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
SubscribeLocalEvent<RoundRestartCleanupEvent>(Reset);
|
||||
SubscribeLocalEvent<CollisionChangeMessage>(QueueCollisionChangeMessage);
|
||||
SubscribeLocalEvent<MoveEvent>(QueueMoveEvent);
|
||||
SubscribeLocalEvent<AccessReaderChangeMessage>(QueueAccessChangeMessage);
|
||||
@@ -385,7 +386,7 @@ namespace Content.Server.AI.Pathfinding
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
public void Reset(RoundRestartCleanupEvent ev)
|
||||
{
|
||||
_graph.Clear();
|
||||
_collidableUpdateQueue.Clear();
|
||||
|
||||
Reference in New Issue
Block a user