2021-11-08 15:33:45 -07:00
|
|
|
|
using Content.Shared.Chemistry.Components;
|
2021-11-10 03:11:28 -07:00
|
|
|
|
using Content.Shared.Chemistry.Reagent;
|
2021-11-08 15:33:45 -07:00
|
|
|
|
using JetBrains.Annotations;
|
|
|
|
|
|
using Robust.Shared.GameObjects;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
|
|
|
|
|
|
{
|
|
|
|
|
|
[UsedImplicitly]
|
|
|
|
|
|
public class PlantAdjustNutrition : PlantAdjustAttribute
|
|
|
|
|
|
{
|
2021-11-21 00:35:02 -07:00
|
|
|
|
public override void Effect(ReagentEffectArgs args)
|
2021-11-08 15:33:45 -07:00
|
|
|
|
{
|
2021-11-10 03:11:28 -07:00
|
|
|
|
if (!CanMetabolize(args.SolutionEntity, out var plantHolderComp, args.EntityManager))
|
2021-11-08 15:33:45 -07:00
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
plantHolderComp.AdjustNutrient(Amount);
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|