Puddles & spreader refactor (#15191)
This commit is contained in:
@@ -33,7 +33,7 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
|
||||
// Spill the solution out into the world
|
||||
// Spill before exploding in anticipation of a future where the explosion can light the solution on fire.
|
||||
var coordinates = system.EntityManager.GetComponent<TransformComponent>(owner).Coordinates;
|
||||
system.SpillableSystem.SpillAt(explodingSolution, coordinates, "PuddleSmear", combine: true);
|
||||
system.PuddleSystem.TrySpillAt(coordinates, explodingSolution, out _);
|
||||
|
||||
// Explode
|
||||
// Don't delete the object here - let other processes like physical damage from the
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
|
||||
public void Execute(EntityUid owner, DestructibleSystem system, EntityUid? cause = null)
|
||||
{
|
||||
var solutionContainerSystem = EntitySystem.Get<SolutionContainerSystem>();
|
||||
var spillableSystem = EntitySystem.Get<SpillableSystem>();
|
||||
var spillableSystem = EntitySystem.Get<PuddleSystem>();
|
||||
|
||||
var coordinates = system.EntityManager.GetComponent<TransformComponent>(owner).Coordinates;
|
||||
|
||||
@@ -31,12 +31,12 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
|
||||
solutionContainerSystem.TryGetSolution(owner, spillableComponent.SolutionName,
|
||||
out var compSolution))
|
||||
{
|
||||
spillableSystem.SplashSpillAt(owner, compSolution, coordinates, "PuddleSmear", false, user: cause);
|
||||
spillableSystem.TrySplashSpillAt(owner, coordinates, compSolution, out _, false, user: cause);
|
||||
}
|
||||
else if (Solution != null &&
|
||||
solutionContainerSystem.TryGetSolution(owner, Solution, out var behaviorSolution))
|
||||
{
|
||||
spillableSystem.SplashSpillAt(owner, behaviorSolution, coordinates, "PuddleSmear", user: cause);
|
||||
spillableSystem.TrySplashSpillAt(owner, coordinates, behaviorSolution, out _, user: cause);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user