Add EntityEffectOnTrigger and RejuvenateOnTrigger (#40967)

commit
This commit is contained in:
slarticodefast
2025-10-19 16:42:18 +02:00
committed by GitHub
parent 69e2963945
commit 1b7fa85733
10 changed files with 110 additions and 9 deletions

View File

@@ -0,0 +1,24 @@
using Content.Shared.EntityEffects;
using Robust.Shared.GameStates;
namespace Content.Shared.Trigger.Components.Effects;
/// <summary>
/// Applies a list of entity effects to the owning entity when triggered.
/// If TargetUser is true then they will be applied to the user instead.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class EntityEffectOnTriggerComponent : BaseXOnTriggerComponent
{
/// <summary>
/// The effects to apply.
/// </summary>
[DataField, AutoNetworkedField]
public EntityEffect[] Effects;
/// <summary>
/// Optional scale multiplier for the effects.
/// </summary>
[DataField, AutoNetworkedField]
public float Scale = 1f;
}