ActSystem and Destruction Threshold Behaviors use EntityUid.

This commit is contained in:
Vera Aguilera Puerto
2021-11-09 12:06:00 +01:00
parent c5fda6daca
commit 5cec5c421c
14 changed files with 44 additions and 42 deletions

View File

@@ -4,6 +4,7 @@ using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
using System.Threading.Tasks;
using Content.Server.Destructible;
using Content.Shared.Acts;
namespace Content.Server.Construction.Completions
{
@@ -13,11 +14,7 @@ namespace Content.Server.Construction.Completions
{
public void PerformAction(EntityUid uid, EntityUid? userUid, IEntityManager entityManager)
{
if (!entityManager.TryGetEntity(uid, out var entity))
return; // This should never happen, but.
var destructibleSystem = EntitySystem.Get<DestructibleSystem>();
destructibleSystem.ActSystem.HandleDestruction(entity);
entityManager.EntitySysManager.GetEntitySystem<ActSystem>().HandleDestruction(uid);
}
}
}