Converted everything to use collision and physics component interfaces.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Content.Server.GameObjects.Components.Access;
|
||||
using Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Pathfinders;
|
||||
@@ -148,7 +148,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
|
||||
var targetNode = _pathfindingSystem.GetNode(targetTile);
|
||||
|
||||
var collisionMask = 0;
|
||||
if (entity.TryGetComponent(out CollidableComponent collidableComponent))
|
||||
if (entity.TryGetComponent(out ICollidableComponent collidableComponent))
|
||||
{
|
||||
collisionMask = collidableComponent.CollisionMask;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using Content.Server.GameObjects.Components.Access;
|
||||
using Content.Server.GameObjects.Components.Movement;
|
||||
using Robust.Shared.GameObjects.Components;
|
||||
@@ -27,7 +27,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
|
||||
public static ReachableArgs GetArgs(IEntity entity)
|
||||
{
|
||||
var collisionMask = 0;
|
||||
if (entity.TryGetComponent(out CollidableComponent collidableComponent))
|
||||
if (entity.TryGetComponent(out ICollidableComponent collidableComponent))
|
||||
{
|
||||
collisionMask = collidableComponent.CollisionMask;
|
||||
}
|
||||
@@ -38,4 +38,4 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
|
||||
return new ReachableArgs(visionRadius, access, collisionMask);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user