Content update for NetEntities (#18935)
This commit is contained in:
@@ -1,12 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Content.Shared.Construction;
|
||||
using System.Linq;
|
||||
using Content.Shared.Construction.Prototypes;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.Placement;
|
||||
using Robust.Client.Utility;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Map;
|
||||
|
||||
namespace Content.Client.Construction
|
||||
@@ -39,9 +34,9 @@ namespace Content.Client.Construction
|
||||
/// <inheritdoc />
|
||||
public override bool HijackDeletion(EntityUid entity)
|
||||
{
|
||||
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out ConstructionGhostComponent? ghost))
|
||||
if (IoCManager.Resolve<IEntityManager>().HasComponent<ConstructionGhostComponent>(entity))
|
||||
{
|
||||
_constructionSystem.ClearGhost(ghost.GhostId);
|
||||
_constructionSystem.ClearGhost(entity.GetHashCode());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user