2021-07-17 02:37:09 +02:00
|
|
|
|
using JetBrains.Annotations;
|
2021-02-11 01:13:03 -08:00
|
|
|
|
using Robust.Shared.GameObjects;
|
2020-10-26 23:19:46 +01:00
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|