]> git.smokeofanarchy.ru Git - space-station-14.git/blob
f35ff25b25b740fdfc17e970d099207eb3fcc788
[space-station-14.git] /
1 using Content.Server.Botany.Components;
2 using Content.Server.Botany.Systems;
3 using Content.Shared.EntityEffects;
4 using Content.Shared.EntityEffects.Effects.Botany.PlantAttributes;
5
6 namespace Content.Server.EntityEffects.Effects.Botany.PlantAttributes;
7
8 public sealed partial class PlantAdjustMutationLevelEntityEffectSystem : EntityEffectSystem<PlantHolderComponent, PlantAdjustMutationLevel>
9 {
10     [Dependency] private readonly PlantHolderSystem _plantHolder = default!;
11
12     protected override void Effect(Entity<PlantHolderComponent> entity, ref EntityEffectEvent<PlantAdjustMutationLevel> args)
13     {
14         if (entity.Comp.Seed == null || entity.Comp.Dead)
15             return;
16
17         entity.Comp.Health += args.Effect.Amount;
18         _plantHolder.CheckHealth(entity, entity.Comp);
19     }
20 }