* feat: TriggerOnUiOpen/Close * chore: minor clarification * Update Content.Shared/Trigger/Components/Triggers/TriggerOnUiCloseComponent.cs Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * Update Content.Shared/Trigger/Components/Triggers/TriggerOnUiOpenComponent.cs Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * chore: review --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
18 lines
589 B
C#
18 lines
589 B
C#
using Robust.Shared.GameStates;
|
|
|
|
namespace Content.Shared.Trigger.Components.Triggers;
|
|
|
|
/// <summary>
|
|
/// Triggers when a user opens a UI belonging to the owning entity.
|
|
/// The user is the actor that tries to open a UI.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
|
public sealed partial class TriggerOnUiOpenComponent : BaseTriggerOnXComponent
|
|
{
|
|
/// <summary>
|
|
/// If it should only work on specific UIs.
|
|
/// Null means it will work on any UI key.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public HashSet<Enum>? UiKeys;
|
|
}
|