using Content.Shared.Botany.Components; using Content.Shared.Botany.Systems; namespace Content.Shared.EntityEffects.Effects.Botany.PlantAttributes; /// /// Entity effect that adjusts the weed tolerance of a plant. /// /// public sealed partial class PlantAdjustWeedToleranceEntityEffectSystem : EntityEffectSystem { [Dependency] private PlantHolderSystem _plantHolder = default!; [Dependency] private PlantWeedPestSystem _plantWeedPest = default!; protected override void Effect(Entity entity, ref EntityEffectEvent args) { if (_plantHolder.IsDead(entity.Owner)) return; _plantWeedPest.AdjustWeedTolerance(entity.AsNullable(), args.Effect.Amount); } } /// public sealed partial class PlantAdjustWeedTolerance : BasePlantAdjustAttribute { public override string GuidebookAttributeName { get; set; } = "plant-attribute-weed-tolerance"; }