Files
tbd-station-14/Content.Shared/Trigger/Components/Triggers/TriggerOnGotInsertedIntoContainerComponent.cs
Artxmisery 2b31fa98c9 Add container-related triggers (#39647)
* added triggers for when an entity is inserted or removed from a container, for both the entity and the container

* removed unnecessary comments

* consolidated into one shared system for all four triggers

* consolidated into one shared system for all four triggers

* named it right this time

* made container owner user of got triggers and added guard statements

* container id

* Update Content.Shared/Trigger/Components/Triggers/TriggerOnRemovedFromContainerComponent.cs

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-08-15 01:53:48 +02:00

19 lines
633 B
C#

using Robust.Shared.GameStates;
namespace Content.Shared.Trigger.Components.Triggers;
/// <summary>
/// Triggers an entity when it gets inserted into a container.
/// The user is the owner of the container the entity is being inserted into.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class TriggerOnGotInsertedIntoContainerComponent : BaseTriggerOnXComponent
{
/// <summary>
/// The container to the entity has to be inserted into.
/// Null will allow all containers.
/// </summary>
[DataField, AutoNetworkedField]
public string? ContainerId;
}