ActSystem and Destruction Threshold Behaviors use EntityUid.
This commit is contained in:
@@ -20,21 +20,23 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
|
||||
/// </summary>
|
||||
/// <param name="owner">Entity on which behavior is executed</param>
|
||||
/// <param name="system">system calling the behavior</param>
|
||||
public void Execute(IEntity owner, DestructibleSystem system)
|
||||
/// <param name="entityManager"></param>
|
||||
public void Execute(EntityUid owner, DestructibleSystem system, IEntityManager entityManager)
|
||||
{
|
||||
var solutionContainerSystem = EntitySystem.Get<SolutionContainerSystem>();
|
||||
|
||||
var coordinates = entityManager.GetComponent<TransformComponent>(owner).Coordinates;
|
||||
|
||||
if (owner.TryGetComponent(out SpillableComponent? spillableComponent) &&
|
||||
solutionContainerSystem.TryGetSolution(owner.Uid, spillableComponent.SolutionName,
|
||||
if (entityManager.TryGetComponent(owner, out SpillableComponent? spillableComponent) &&
|
||||
solutionContainerSystem.TryGetSolution(owner, spillableComponent.SolutionName,
|
||||
out var compSolution))
|
||||
{
|
||||
compSolution.SpillAt(owner.Transform.Coordinates, "PuddleSmear", false);
|
||||
compSolution.SpillAt(coordinates, "PuddleSmear", false);
|
||||
}
|
||||
else if (Solution != null &&
|
||||
solutionContainerSystem.TryGetSolution(owner.Uid, Solution, out var behaviorSolution))
|
||||
solutionContainerSystem.TryGetSolution(owner, Solution, out var behaviorSolution))
|
||||
{
|
||||
behaviorSolution.SpillAt(owner.Transform.Coordinates, "PuddleSmear", false);
|
||||
behaviorSolution.SpillAt(coordinates, "PuddleSmear", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user