Files
tbd-station-14/Content.Shared/Trigger/Components/Triggers/TriggerOnCollideComponent.cs
Charlie Morley 818a715822 prevent repeat TriggerOnCollide triggers (#40428)
* prevent repeat TriggerOnCollide triggers

* review comment: remove TriggerOnCollide when out of triggers
2025-09-21 17:23:37 +02:00

30 lines
906 B
C#

using Robust.Shared.GameStates;
namespace Content.Shared.Trigger.Components.Triggers;
/// <summary>
/// Triggers when colliding with another entity.
/// The user is the entity collided with.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class TriggerOnCollideComponent : BaseTriggerOnXComponent
{
/// <summary>
/// The fixture with which to collide.
/// </summary>
[DataField(required: true), AutoNetworkedField]
public string FixtureID = string.Empty;
/// <summary>
/// Doesn't trigger if the other colliding fixture is nonhard.
/// </summary>
[DataField, AutoNetworkedField]
public bool IgnoreOtherNonHard = true;
/// <summary>
/// If not null, limits the amount of times this component can trigger.
/// </summary>
[DataField, AutoNetworkedField]
public int? MaxTriggers = null;
}