Trigger Refactor (#39034)

This commit is contained in:
slarticodefast
2025-08-03 21:20:37 +02:00
committed by GitHub
parent 777e89ab3e
commit 2c40a950f7
256 changed files with 3987 additions and 2892 deletions

View File

@@ -0,0 +1,29 @@
using Robust.Shared.GameStates;
namespace Content.Shared.Trigger.Components.Effects;
/// <summary>
/// Will cause an EMP at the entity's location when triggered.
/// If TargetUser is true then it will be spawned at their position.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class EmpOnTriggerComponent : BaseXOnTriggerComponent
{
/// <summary>
/// EMP range.
/// </summary>
[DataField, AutoNetworkedField]
public float Range = 1.0f;
/// <summary>
/// How much energy (in Joules) will be consumed per battery in range.
/// </summary>
[DataField, AutoNetworkedField]
public float EnergyConsumption;
/// <summary>
/// How long it disables targets.
/// </summary>
[DataField, AutoNetworkedField]
public TimeSpan DisableDuration = TimeSpan.FromSeconds(60);
}