19 lines
501 B
C#
19 lines
501 B
C#
using JetBrains.Annotations;
|
|
using Robust.Shared.GameObjects;
|
|
|
|
namespace Content.Server.Chemistry.PlantMetabolism
|
|
{
|
|
[UsedImplicitly]
|
|
public class AdjustHealth : AdjustAttribute
|
|
{
|
|
public override void Metabolize(IEntity plantHolder, float customPlantMetabolism = 1f)
|
|
{
|
|
if (!CanMetabolize(plantHolder, out var plantHolderComp))
|
|
return;
|
|
|
|
plantHolderComp.Health += Amount;
|
|
plantHolderComp.CheckHealth();
|
|
}
|
|
}
|
|
}
|