Files
tbd-station-14/Content.Server/Destructible/Thresholds/Behaviors/SpawnGasBehavior.cs
Jezithyr 6869adfa78 Move GasMixture to shared (#27480)
* Moved GasMixture to shared

* Temp Fix for sandbox violation, idk why Array.Resize isn't working properly. It's already sandboxed.

* The most powerful webedit in history
2024-04-30 14:31:05 -07:00

22 lines
601 B
C#

using Content.Server.Atmos;
using Content.Shared.Atmos;
using JetBrains.Annotations;
namespace Content.Server.Destructible.Thresholds.Behaviors;
[UsedImplicitly]
[DataDefinition]
public sealed partial class SpawnGasBehavior : IThresholdBehavior
{
[DataField("gasMixture", required: true)]
public GasMixture Gas = new();
public void Execute(EntityUid owner, DestructibleSystem system, EntityUid? cause = null)
{
var air = system.AtmosphereSystem.GetContainingMixture(owner, false, true);
if (air != null)
system.AtmosphereSystem.Merge(air, Gas);
}
}