PlantAdjustToxins.cs 628 B

1234567891011121314151617181920
  1. using Content.Shared.EntityEffects;
  2. using JetBrains.Annotations;
  3. namespace Content.Server.EntityEffects.Effects.PlantMetabolism;
  4. [UsedImplicitly]
  5. public sealed partial class PlantAdjustToxins : PlantAdjustAttribute
  6. {
  7. public override string GuidebookAttributeName { get; set; } = "plant-attribute-toxins";
  8. public override bool GuidebookIsAttributePositive { get; protected set; } = false;
  9. public override void Effect(EntityEffectBaseArgs args)
  10. {
  11. if (!CanMetabolize(args.TargetEntity, out var plantHolderComp, args.EntityManager))
  12. return;
  13. plantHolderComp.Toxins += Amount;
  14. }
  15. }