using Content.Shared._DV.Addictions; using Content.Shared.EntityEffects; using Content.Shared.StatusEffect; using Robust.Shared.Prototypes; namespace Content.Shared._DV.EntityEffects.Effects.Addiction; // TODO: When Addiction is moved to new Status, make this use StatusEffectsContainerComponent. /// /// Applies the addition status effect for an amount of time based on how much of the addicting reagent is in the system. /// /// public sealed partial class AddictingEntityEffectSystem : EntityEffectSystem { [Dependency] private readonly SharedAddictionSystem _addiction = default!; protected override void Effect(Entity entity, ref EntityEffectEvent args) { var addictionTime = args.Effect.Time * args.Scale; _addiction.TryApplyAddiction(entity, addictionTime); } } /// public sealed partial class Addicting : EntityEffectBase { /// /// How long should the pain be per 1u of the reagent. /// [DataField] public float Time = 5f; public override string? EntityEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) => Loc.GetString("reagent-effect-guidebook-addicted", ("chance", Probability)); }