2021-02-27 04:12:09 +01:00
|
|
|
|
#nullable enable
|
|
|
|
|
|
using System;
|
2021-02-11 01:13:03 -08:00
|
|
|
|
using Robust.Shared.GameObjects;
|
2020-10-10 15:25:13 +02:00
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.GameObjects.Components.Body.Part
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// This interface gives components behavior when a body part
|
|
|
|
|
|
/// is added to their owning entity.
|
|
|
|
|
|
/// </summary>
|
2020-11-15 04:22:59 +01:00
|
|
|
|
public interface IBodyPartAdded : IComponent
|
2020-10-10 15:25:13 +02:00
|
|
|
|
{
|
2020-11-15 04:22:59 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Called when a <see cref="IBodyPart"/> is added to the
|
|
|
|
|
|
/// entity owning this component.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="args">Information about the part that was added.</param>
|
2020-10-10 15:25:13 +02:00
|
|
|
|
void BodyPartAdded(BodyPartAddedEventArgs args);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class BodyPartAddedEventArgs : EventArgs
|
|
|
|
|
|
{
|
|
|
|
|
|
public BodyPartAddedEventArgs(IBodyPart part, string slot)
|
|
|
|
|
|
{
|
|
|
|
|
|
Part = part;
|
|
|
|
|
|
Slot = slot;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-11-15 04:22:59 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The part that was added.
|
|
|
|
|
|
/// </summary>
|
2020-10-10 15:25:13 +02:00
|
|
|
|
public IBodyPart Part { get; }
|
|
|
|
|
|
|
2020-11-15 04:22:59 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The slot that <see cref="Part"/> was added to.
|
|
|
|
|
|
/// </summary>
|
2020-10-10 15:25:13 +02:00
|
|
|
|
public string Slot { get; }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|