using Content.Shared.Chemistry.Reagent; using Content.Server.Disease; using Content.Shared.Disease; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; using JetBrains.Annotations; namespace Content.Server.Chemistry.ReagentEffects { /// /// Default metabolism for medicine reagents. /// [UsedImplicitly] public sealed class ChemCauseDisease : ReagentEffect { /// /// Chance it has each tick to cause disease, between 0 and 1 /// [DataField("causeChance")] public float CauseChance = 0.15f; /// /// The disease to add. /// [DataField("disease", customTypeSerializer: typeof(PrototypeIdSerializer), required: true)] [ViewVariables(VVAccess.ReadWrite)] public string Disease = default!; public override void Effect(ReagentEffectArgs args) { EntitySystem.Get().TryAddDisease(args.SolutionEntity, Disease); } } }