using Content.Shared.Botany.Components;
using Content.Shared.Botany.Systems;
using Content.Shared.Botany.Traits.Components;
using Content.Shared.Popups;
using Robust.Shared.Prototypes;
namespace Content.Shared.EntityEffects.Effects.Botany.PlantAttributes;
///
/// Entity effect that adds the to a plant.
///
///
public sealed partial class PlantDestroySeedsEntityEffectSystem : EntityEffectSystem
{
[Dependency] private SharedPopupSystem _popup = default!;
[Dependency] private PlantHolderSystem _plantHolder = default!;
protected override void Effect(Entity entity, ref EntityEffectEvent args)
{
if (_plantHolder.IsDead(entity.Owner))
return;
_popup.PopupEntity(
Loc.GetString("botany-plant-seedsdestroyed"),
entity,
PopupType.SmallCaution
);
EnsureComp(entity.Owner);
}
}
///
public sealed partial class PlantDestroySeeds : EntityEffectBase
{
public override string EntityEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) =>
Loc.GetString("entity-effect-guidebook-plant-seeds-remove", ("chance", Probability));
}