Minor spill refactors (#5569)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Content.Server.Chemistry.EntitySystems;
|
||||
using Content.Server.Fluids.Components;
|
||||
using Content.Server.Fluids.EntitySystems;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
@@ -20,10 +21,10 @@ 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>
|
||||
/// <param name="entityManager"></param>
|
||||
public void Execute(EntityUid owner, DestructibleSystem system)
|
||||
{
|
||||
var solutionContainerSystem = EntitySystem.Get<SolutionContainerSystem>();
|
||||
var spillableSystem = EntitySystem.Get<SpillableSystem>();
|
||||
|
||||
var coordinates = system.EntityManager.GetComponent<TransformComponent>(owner).Coordinates;
|
||||
|
||||
@@ -31,12 +32,12 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
|
||||
solutionContainerSystem.TryGetSolution(owner, spillableComponent.SolutionName,
|
||||
out var compSolution))
|
||||
{
|
||||
compSolution.SpillAt(coordinates, "PuddleSmear", false);
|
||||
spillableSystem.SpillAt(compSolution, coordinates, "PuddleSmear", false);
|
||||
}
|
||||
else if (Solution != null &&
|
||||
solutionContainerSystem.TryGetSolution(owner, Solution, out var behaviorSolution))
|
||||
{
|
||||
behaviorSolution.SpillAt(coordinates, "PuddleSmear", false);
|
||||
spillableSystem.SpillAt(behaviorSolution, coordinates, "PuddleSmear", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user