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

@@ -84,17 +84,17 @@ namespace Content.Server.Destructible.Thresholds
/// An instance of <see cref="DestructibleSystem"/> to get dependency and
/// system references from, if relevant.
/// </param>
public void Execute(IEntity owner, DestructibleSystem system)
public void Execute(EntityUid owner, DestructibleSystem system, IEntityManager entityManager)
{
Triggered = true;
foreach (var behavior in Behaviors)
{
// The owner has been deleted. We stop execution of behaviors here.
if (owner.Deleted)
if (!entityManager.EntityExists(owner))
return;
behavior.Execute(owner, system);
behavior.Execute(owner, system, entityManager);
}
}
}