PlantAdjustMutationLevel.cs 546 B

12345678910111213141516
  1. using Content.Shared.EntityEffects;
  2. namespace Content.Server.EntityEffects.Effects.PlantMetabolism;
  3. public sealed partial class PlantAdjustMutationLevel : PlantAdjustAttribute
  4. {
  5. public override string GuidebookAttributeName { get; set; } = "plant-attribute-mutation-level";
  6. public override void Effect(EntityEffectBaseArgs args)
  7. {
  8. if (!CanMetabolize(args.TargetEntity, out var plantHolderComp, args.EntityManager))
  9. return;
  10. plantHolderComp.MutationLevel += Amount * plantHolderComp.MutationMod;
  11. }
  12. }