Files
OldThink/Content.Server/Chemistry/PlantMetabolism/AdjustMutationLevel.cs
2021-07-16 17:37:09 -07:00

18 lines
533 B
C#

using JetBrains.Annotations;
using Robust.Shared.GameObjects;
namespace Content.Server.Chemistry.PlantMetabolism
{
[UsedImplicitly]
public class AdjustMutationLevel : AdjustAttribute
{
public override void Metabolize(IEntity plantHolder, float customPlantMetabolism = 1f)
{
if (!CanMetabolize(plantHolder, out var plantHolderComp, false))
return;
plantHolderComp.MutationLevel += Amount * plantHolderComp.MutationMod * customPlantMetabolism;
}
}
}