CatStation/Content.Server/EntityEffects/Effects/Atmos/CreateGasEntityEffectSystem.cs
Pieter-Jan Briers 5168b5f3d4
IoC source gen compatibility (#43863)
* IoC source gen compatibility

Can be merged before or after https://github.com/space-wizards/RobustToolbox/pull/6549 doesn't really matter.

* Missed a spot
2026-05-09 03:29:58 +00:00

22 lines
857 B
C#

using Content.Server.Atmos.EntitySystems;
using Content.Shared.EntityEffects;
using Content.Shared.EntityEffects.Effects.Atmos;
namespace Content.Server.EntityEffects.Effects.Atmos;
/// <summary>
/// This effect adjusts a gas at the tile this entity is currently on.
/// The amount changed is modified by scale.
/// </summary>
/// <inheritdoc cref="EntityEffectSystem{T,TEffect}"/>
public sealed partial class CreateGasEntityEffectSystem : EntityEffectSystem<TransformComponent, CreateGas>
{
[Dependency] private AtmosphereSystem _atmosphere = default!;
protected override void Effect(Entity<TransformComponent> entity, ref EntityEffectEvent<CreateGas> args)
{
var tileMix = _atmosphere.GetContainingMixture(entity.AsNullable(), false, true);
tileMix?.AdjustMoles(args.Effect.Gas, args.Scale * args.Effect.Moles);
}
}