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 removes the from a plant.
///
///
public sealed partial class PlantRestoreSeedsEntityEffectSystem : 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-seedsrestored"), entity);
RemCompDeferred(entity.Owner);
}
}
///
public sealed partial class PlantRestoreSeeds : EntityEffectBase
{
public override string EntityEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) =>
Loc.GetString("entity-effect-guidebook-plant-seeds-add", ("chance", Probability));
}