Files
tbd-station-14/Content.Shared/Body/Part/IBodyPartRemoved.cs
mirrorcult 457e8c64ee Convert StomachBehavior to a component/system + rejig body namespaces (#5249)
* Convert StomachBehavior to a component/system + rejig body namespaces

* test

* slightly more namespace changes

* remove

* Hello?????

* fuck you github test runner

* reviews

* oobsy!
2021-11-11 16:10:57 -07:00

41 lines
1.2 KiB
C#

using System;
using Content.Shared.Body.Components;
using Robust.Shared.Serialization;
namespace Content.Shared.Body.Part
{
/// <summary>
/// This interface gives components behavior when a body part
/// is removed from their owning entity.
/// </summary>
public interface IBodyPartRemoved
{
/// <summary>
/// Called when a <see cref="SharedBodyPartComponent"/> is removed from the
/// entity owning this component.
/// </summary>
/// <param name="args">Information about the part that was removed.</param>
void BodyPartRemoved(BodyPartRemovedEventArgs args);
}
[Serializable, NetSerializable]
public class BodyPartRemovedEventArgs : EventArgs
{
public BodyPartRemovedEventArgs(string slot, SharedBodyPartComponent part)
{
Slot = slot;
Part = part;
}
/// <summary>
/// The slot that <see cref="Part"/> was removed from.
/// </summary>
public string Slot { get; }
/// <summary>
/// The part that was removed.
/// </summary>
public SharedBodyPartComponent Part { get; }
}
}