Files
OldThink/Content.Server/Chemistry/ReagentEffects/PlantMetabolism/PlantAdjustNutrition.cs
mirrorcult 1ab7170adb Refactor reaction effects to use reagent effects (#5426)
* reaction effect refactor

* works now
2021-11-21 00:35:02 -07:00

21 lines
588 B
C#

using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reagent;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
{
[UsedImplicitly]
public class PlantAdjustNutrition : PlantAdjustAttribute
{
public override void Effect(ReagentEffectArgs args)
{
if (!CanMetabolize(args.SolutionEntity, out var plantHolderComp, args.EntityManager))
return;
plantHolderComp.AdjustNutrient(Amount);
return;
}
}
}