using Content.Shared.Botany.Components;
using Content.Shared.Botany.Systems;
namespace Content.Shared.EntityEffects.Effects.Botany.PlantAttributes;
///
/// Entity effect that adjusts the water consumption of a plant.
///
///
public sealed partial class PlantAdjustWaterConsumptionEntityEffectSystem : EntityEffectSystem
{
[Dependency] private PlantGrowthSystem _plantGrowth = default!;
[Dependency] private PlantHolderSystem _plantHolder = default!;
protected override void Effect(Entity entity, ref EntityEffectEvent args)
{
if (_plantHolder.IsDead(entity.Owner))
return;
_plantGrowth.AdjustWaterConsumption(entity.AsNullable(), args.Effect.Amount);
}
}
///
public sealed partial class PlantAdjustWaterConsumption : BasePlantAdjustAttribute
{
public override string GuidebookAttributeName { get; set; } = "plant-attribute-water-consumption";
public override bool GuidebookIsAttributePositive { get; protected set; } = false;
}