* Moves HumanoidCharacterAppearance to ECS * Makes HumanoidAppearanceSystem work over networks * Makes HumanoidAppearanceSystem more efficient * Cleans up the files * Updates privacy on a couple of functions * Fixes a few using references, renames a file * Makes HumanoidAppearanceSystem more cleaner * Fixes Magic Mirror * Cleanup * HumanoidAppearanceComponent now has a friend SharedHumanoidAppearanceSystem is only allowed to act on this, now * Fixes the Body-HumanoidAppearance ECS scaffolding * a little cleanup never hurt anybody * quick fix for magic mirror appearance access * Replaces a networked event with a local one This one was... causing bugs
40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using System;
|
|
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; }
|
|
}
|
|
}
|