using Content.Shared.Body.Components; using Content.Shared.Body.Systems; using Content.Shared.FixedPoint; using Robust.Shared.Prototypes; namespace Content.Shared.EntityEffects.Effects.Body; /// /// Modifies the amount of blood in this entity's bloodstream by a given amount multiplied by scale. /// This effect can increase or decrease blood level. /// /// public sealed partial class ModifyBloodLevelEntityEffectSystem : EntityEffectSystem { [Dependency] private readonly SharedBloodstreamSystem _bloodstream = default!; protected override void Effect(Entity entity, ref EntityEffectEvent args) { _bloodstream.TryModifyBloodLevel(entity.AsNullable(), args.Effect.Amount * args.Scale); } } /// public sealed partial class ModifyBloodLevel : EntityEffectBase { /// /// Amount of bleed we're applying or removing if negative. /// [DataField] public FixedPoint2 Amount = 1.0f; public override string? EntityEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) => Loc.GetString("entity-effect-guidebook-modify-blood-level", ("chance", Probability), ("deltasign", MathF.Sign(Amount.Float()))); }