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>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Trigger.Components.Triggers;
|
||||
|
||||
/// <summary>
|
||||
/// Triggers an entity when something is inserted into it.
|
||||
/// The user is the entity being inserted into the container.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
public sealed partial class TriggerOnInsertedIntoContainerComponent : BaseTriggerOnXComponent
|
||||
{
|
||||
/// <summary>
|
||||
/// The container to the entity has to be inserted into.
|
||||
/// Null will allow all containers.
|
||||
/// </summary>
|
||||
[DataField, AutoNetworkedField]
|
||||
public string? ContainerId;
|
||||
}
|
||||
Reference in New Issue
Block a user