mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-16 13:51:10 +03:00
* IoC source gen compatibility Can be merged before or after https://github.com/space-wizards/RobustToolbox/pull/6549 doesn't really matter. * Missed a spot
24 lines
894 B
C#
24 lines
894 B
C#
using Content.Server.Botany.Components;
|
|
using Content.Server.Botany.Systems;
|
|
using Content.Server.Popups;
|
|
using Content.Shared.EntityEffects;
|
|
using Content.Shared.EntityEffects.Effects.Botany.PlantAttributes;
|
|
|
|
namespace Content.Server.EntityEffects.Effects.Botany.PlantAttributes;
|
|
|
|
public sealed partial class PlantRestoreSeedsEntityEffectSystem : EntityEffectSystem<PlantHolderComponent, PlantRestoreSeeds>
|
|
{
|
|
[Dependency] private PopupSystem _popup = default!;
|
|
|
|
protected override void Effect(Entity<PlantHolderComponent> entity, ref EntityEffectEvent<PlantRestoreSeeds> args)
|
|
{
|
|
if (entity.Comp.Seed == null || entity.Comp.Dead || entity.Comp.Seed.Immutable)
|
|
return;
|
|
|
|
if (!entity.Comp.Seed.Seedless)
|
|
return;
|
|
|
|
_popup.PopupEntity(Loc.GetString("botany-plant-seedsrestored"), entity);
|
|
entity.Comp.Seed.Seedless = false;
|
|
}
|
|
}
|