Puddles & spreader refactor (#15191)

This commit is contained in:
metalgearsloth
2023-04-10 15:37:03 +10:00
committed by GitHub
parent 3178ab83f6
commit 317a4013eb
141 changed files with 3046 additions and 3201 deletions

View File

@@ -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

View File

@@ -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);
}
}
}