Files
tbd-station-14/Content.Shared/_Offbrand/EntityEffects/ClampWounds.cs
Janet Blackquill d1d939a898 rebase
2025-11-21 00:32:28 -05:00

28 lines
930 B
C#

using Content.Shared._Offbrand.Wounds;
using Content.Shared.EntityEffects;
using Content.Shared.FixedPoint;
using Robust.Shared.Prototypes;
namespace Content.Shared._Offbrand.EntityEffects;
public sealed partial class ClampWounds : EntityEffectBase<ClampWounds>
{
[DataField(required: true)]
public float Chance;
public override string? EntityEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys)
{
return Loc.GetString("entity-effect-guidebook-clamp-wounds", ("probability", Probability), ("chance", Chance));
}
}
public sealed class ClampWoundsEntityEffectSystem : EntityEffectSystem<WoundableComponent, ClampWounds>
{
[Dependency] private readonly WoundableSystem _woundable = default!;
protected override void Effect(Entity<WoundableComponent> ent, ref EntityEffectEvent<ClampWounds> args)
{
_woundable.ClampWounds(ent, args.Effect.Chance);
}
}