Files
tbd-station-14/Content.Shared/_Offbrand/StatusEffects/PainkillerStatusEffectSystem.cs
Janet Blackquill 5fa17e22a1 De-MPL Offbrand
2025-09-27 22:43:24 -04:00

20 lines
609 B
C#

using Content.Shared._Offbrand.Wounds;
using Content.Shared.StatusEffectNew;
namespace Content.Shared._Offbrand.StatusEffects;
public sealed class PainkillerStatusEffectSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<PainkillerStatusEffectComponent, StatusEffectRelayedEvent<GetPainEvent>>(OnGetPain);
}
private void OnGetPain(Entity<PainkillerStatusEffectComponent> ent, ref StatusEffectRelayedEvent<GetPainEvent> args)
{
args.Args = args.Args with { Pain = args.Args.Pain - ent.Comp.Effectiveness };
}
}