* Oh the possibilities * Merge fixes * Forgot to remote LavaSystem oops * Changed EntityEffectArgs to EntityEffectBaseArgs and EntityEffectReagentArgs * Throw exception for unimplemented effectargs * Remove Json and overrideable datafields * Fix test issues * Actually fix the compiling issue * Fix comments and remove EntityEffectArgs (no longer used, replaced with EntityEffectBaseArgs)
24 lines
910 B
C#
24 lines
910 B
C#
using Content.Server.Botany.Components;
|
|
using Content.Shared.EntityEffects;
|
|
using JetBrains.Annotations;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Server.EntityEffects.Effects.PlantMetabolism;
|
|
|
|
[UsedImplicitly]
|
|
[DataDefinition]
|
|
public sealed partial class PlantPhalanximine : EntityEffect
|
|
{
|
|
public override void Effect(EntityEffectBaseArgs args)
|
|
{
|
|
if (!args.EntityManager.TryGetComponent(args.TargetEntity, out PlantHolderComponent? plantHolderComp)
|
|
|| plantHolderComp.Seed == null || plantHolderComp.Dead ||
|
|
plantHolderComp.Seed.Immutable)
|
|
return;
|
|
|
|
plantHolderComp.Seed.Viable = true;
|
|
}
|
|
|
|
protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) => Loc.GetString("reagent-effect-guidebook-plant-phalanximine", ("chance", Probability));
|
|
}
|