#nullable enable using System; namespace Robust.Shared.GameObjects { /// /// Arguments for an event related to a component. /// public abstract class ComponentEventArgs : EventArgs { /// /// Component that this event relates to. /// public IComponent Component { get; } /// /// EntityUid of the entity this component belongs to. /// public EntityUid Owner { get; } /// /// Constructs a new instance of . /// /// The relevant component /// EntityUid of the entity this component belongs to. protected ComponentEventArgs(IComponent component, EntityUid owner) { Component = component; Owner = owner; } } /// /// Arguments for an event related to a component being added. /// public sealed class AddedComponentEventArgs : ComponentEventArgs { /// /// Constructs a new instance of . /// /// The relevant component /// EntityUid of the entity this component belongs to. public AddedComponentEventArgs(IComponent component, EntityUid uid) : base(component, uid) { } } /// /// Arguments for an event related to a component being removed. /// public sealed class RemovedComponentEventArgs : ComponentEventArgs { /// /// Constructs a new instance of . /// /// The relevant component /// EntityUid of the entity this component belongs to. public RemovedComponentEventArgs(IComponent component, EntityUid uid) : base(component, uid) { } } /// /// Arguments for an event related to a component being deleted. /// public sealed class DeletedComponentEventArgs : ComponentEventArgs { /// /// Constructs a new instance of . /// /// The relevant component /// EntityUid of the entity this component belongs to. public DeletedComponentEventArgs(IComponent component, EntityUid uid) : base(component, uid) { } } }