Revert "Solution Entities" (#23160)

Revert "Solution Entities (#21916)"

This reverts commit d75e743dd7.
This commit is contained in:
Emisse
2023-12-28 20:45:42 -07:00
committed by GitHub
parent c2c76c2035
commit 938d6d9945
180 changed files with 2959 additions and 3543 deletions

View File

@@ -10,12 +10,12 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
[DataDefinition]
public sealed partial class SolutionExplosionBehavior : IThresholdBehavior
{
[DataField(required: true)]
[DataField("solution", required: true)]
public string Solution = default!;
public void Execute(EntityUid owner, DestructibleSystem system, EntityUid? cause = null)
{
if (system.SolutionContainerSystem.TryGetSolution(owner, Solution, out _, out var explodingSolution)
if (system.SolutionContainerSystem.TryGetSolution(owner, Solution, out var explodingSolution)
&& system.EntityManager.TryGetComponent(owner, out ExplosiveComponent? explosiveComponent))
{
// Don't explode if there's no solution

View File

@@ -1,6 +1,6 @@
using Content.Server.Chemistry.Containers.EntitySystems;
using Content.Server.Fluids.Components;
using Content.Server.Fluids.EntitySystems;
using Content.Shared.Chemistry.EntitySystems;
using JetBrains.Annotations;
namespace Content.Server.Destructible.Thresholds.Behaviors
@@ -9,7 +9,7 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
[DataDefinition]
public sealed partial class SpillBehavior : IThresholdBehavior
{
[DataField]
[DataField("solution")]
public string? Solution;
/// <summary>
@@ -28,12 +28,13 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
var coordinates = system.EntityManager.GetComponent<TransformComponent>(owner).Coordinates;
if (system.EntityManager.TryGetComponent(owner, out SpillableComponent? spillableComponent) &&
solutionContainerSystem.TryGetSolution(owner, spillableComponent.SolutionName, out _, out var compSolution))
solutionContainerSystem.TryGetSolution(owner, spillableComponent.SolutionName,
out var compSolution))
{
spillableSystem.TrySplashSpillAt(owner, coordinates, compSolution, out _, false, user: cause);
}
else if (Solution != null &&
solutionContainerSystem.TryGetSolution(owner, Solution, out _, out var behaviorSolution))
solutionContainerSystem.TryGetSolution(owner, Solution, out var behaviorSolution))
{
spillableSystem.TrySplashSpillAt(owner, coordinates, behaviorSolution, out _, user: cause);
}