2022-12-18 13:12:28 -05:00
|
|
|
|
using Content.Server.Botany.Systems;
|
|
|
|
|
|
using Content.Shared.Chemistry.Reagent;
|
2021-11-08 15:33:45 -07:00
|
|
|
|
using JetBrains.Annotations;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
|
|
|
|
|
|
{
|
|
|
|
|
|
[UsedImplicitly]
|
2023-08-22 18:14:33 -07:00
|
|
|
|
public sealed partial class PlantAdjustWater : PlantAdjustAttribute
|
2021-11-08 15:33:45 -07:00
|
|
|
|
{
|
2021-11-21 00:35:02 -07:00
|
|
|
|
public override void Effect(ReagentEffectArgs args)
|
2021-11-08 15:33:45 -07:00
|
|
|
|
{
|
2021-12-19 19:52:14 +13:00
|
|
|
|
if (!CanMetabolize(args.SolutionEntity, out var plantHolderComp, args.EntityManager, mustHaveAlivePlant: false))
|
2021-11-08 15:33:45 -07:00
|
|
|
|
return;
|
|
|
|
|
|
|
2022-12-18 13:12:28 -05:00
|
|
|
|
var plantHolder = args.EntityManager.System<PlantHolderSystem>();
|
|
|
|
|
|
|
|
|
|
|
|
plantHolder.AdjustWater(args.SolutionEntity, Amount, plantHolderComp);
|
2021-11-08 15:33:45 -07:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|