mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
* Various small botany bugfixes and reverts to prior behavior * oops rainbow cannabis needs it too * oops, need to keep remove around for stuff like phal and plant-b-gone * fix comment * Fixed to make it selectable * No need for plantPhalaxEntityEffect * Ok moving removing this to its own PR because actually the guidebook stuff is weird and I wanna get this out the door. * endless fixes to the botany * renaming methods * Refactored to remove PlantPhalanximineEntityEffectSystem because it's just a trait. * removed the actual file * renamed to noun/description for clarity --------- Co-authored-by: Pok245 <113675512+Pok27@users.noreply.github.com>
28 lines
1 KiB
C#
28 lines
1 KiB
C#
using Content.Shared.Botany.Components;
|
|
using Content.Shared.Botany.Systems;
|
|
|
|
namespace Content.Shared.EntityEffects.Effects.Botany.PlantAttributes;
|
|
|
|
/// <summary>
|
|
/// Entity effect that adjusts the weeds of a plant.
|
|
/// </summary>
|
|
/// <inheritdoc cref="EntityEffectSystem{T,TEffect}"/>
|
|
public sealed partial class PlantAdjustWeedsEntityEffectSystem : EntityEffectSystem<PlantTrayComponent, PlantAdjustWeeds>
|
|
{
|
|
[Dependency] private PlantTraySystem _plantTray = default!;
|
|
|
|
protected override void Effect(Entity<PlantTrayComponent> entity, ref EntityEffectEvent<PlantAdjustWeeds> args)
|
|
{
|
|
if (!_plantTray.HasAlivePlant(entity.AsNullable()))
|
|
return;
|
|
|
|
_plantTray.AdjustWeed(entity.AsNullable(), args.Effect.Amount);
|
|
}
|
|
}
|
|
|
|
/// <inheritdoc cref="EntityEffect"/>
|
|
public sealed partial class PlantAdjustWeeds : BasePlantAdjustAttribute<PlantAdjustWeeds>
|
|
{
|
|
public override string GuidebookAttributeName { get; set; } = "plant-attribute-weeds";
|
|
public override bool GuidebookIsAttributePositive { get; protected set; } = false;
|
|
}
|