* 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>
19 lines
633 B
C#
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;
|
|
}
|