Files
tbd-station-14/Content.Server/Interfaces/GameObjects/Components/Interaction/IBodyPartAdded.cs
DrSmugleaf 827eab17d0 Add body part and body manager interfaces (#1939)
* Add body part and body manager interfaces

* Merge fixes
2020-08-30 11:26:52 +02:00

50 lines
1.2 KiB
C#

using System;
using Content.Server.Body;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
{
/// <summary>
/// This interface gives components behavior when a body part
/// is added to their owning entity.
/// </summary>
public interface IBodyPartAdded
{
void BodyPartAdded(BodyPartAddedEventArgs eventArgs);
}
public class BodyPartAddedEventArgs : EventArgs
{
public BodyPartAddedEventArgs(IBodyPart part, string slotName)
{
Part = part;
SlotName = slotName;
}
public IBodyPart Part { get; }
public string SlotName { get; }
}
/// <summary>
/// This interface gives components behavior when a body part
/// is removed from their owning entity.
/// </summary>
public interface IBodyPartRemoved
{
void BodyPartRemoved(BodyPartRemovedEventArgs eventArgs);
}
public class BodyPartRemovedEventArgs : EventArgs
{
public BodyPartRemovedEventArgs(IBodyPart part, string slotName)
{
Part = part;
SlotName = slotName;
}
public IBodyPart Part { get; }
public string SlotName { get; }
}
}