Remove IBody, IBodyPart, IMechanism and IMechanismBehavior (#4187)

* Remove IBody, IBodyPart, IMechanism and IMechanismBehavior interfaces

* Summary cleanup
This commit is contained in:
DrSmugleaf
2021-06-16 16:44:38 +02:00
committed by GitHub
parent 7cbfbad578
commit 69969bbdc6
72 changed files with 508 additions and 1142 deletions

View File

@@ -12,7 +12,7 @@ namespace Content.Shared.Body.Surgery
public interface ISurgeon
{
public delegate void MechanismRequestCallback(
IMechanism target,
SharedMechanismComponent target,
IBodyPartContainer container,
ISurgeon surgeon,
IEntity performer);
@@ -25,10 +25,10 @@ namespace Content.Shared.Body.Surgery
/// <summary>
/// When performing a surgery, the <see cref="SurgeryDataComponent"/>
/// may sometimes require selecting from a set of
/// <see cref="IMechanism"/>s to operate on.
/// <see cref="SharedMechanismComponent"/>s to operate on.
/// This function is called in that scenario, and it is expected that you call
/// the callback with one <see cref="IMechanism"/> from the provided list.
/// the callback with one <see cref="SharedMechanismComponent"/> from the provided list.
/// </summary>
public void RequestMechanism(IEnumerable<IMechanism> options, MechanismRequestCallback callback);
public void RequestMechanism(IEnumerable<SharedMechanismComponent> options, MechanismRequestCallback callback);
}
}

View File

@@ -6,21 +6,21 @@ using Robust.Shared.GameObjects;
namespace Content.Shared.Body.Surgery
{
/// <summary>
/// Represents the current surgery state of a <see cref="IBodyPart"/>.
/// Represents the current surgery state of a <see cref="SharedBodyPartComponent"/>.
/// </summary>
public interface ISurgeryData : IComponent
{
public delegate void SurgeryAction(IBodyPartContainer container, ISurgeon surgeon, IEntity performer);
/// <summary>
/// The <see cref="IBodyPart"/> this
/// The <see cref="SharedBodyPartComponent"/> this
/// <see cref="ISurgeryData"/> is attached to.
/// </summary>
public IBodyPart? Parent { get; }
public SharedBodyPartComponent? Parent { get; }
/// <summary>
/// The <see cref="BodyPartType"/> of the parent
/// <see cref="IBodyPart"/>.
/// <see cref="SharedBodyPartComponent"/>.
/// </summary>
public BodyPartType? ParentType { get; }
@@ -31,18 +31,18 @@ namespace Content.Shared.Body.Surgery
public string GetDescription();
/// <summary>
/// Returns whether a <see cref="IMechanism"/> can be added into the
/// <see cref="IBodyPart"/> this <see cref="ISurgeryData"/>
/// Returns whether a <see cref="SharedMechanismComponent"/> can be added into the
/// <see cref="SharedBodyPartComponent"/> this <see cref="ISurgeryData"/>
/// represents.
/// </summary>
public bool CanAddMechanism(IMechanism mechanism);
public bool CanAddMechanism(SharedMechanismComponent mechanism);
/// <summary>
/// Returns whether the given <see cref="IBodyPart"/> can be connected
/// to the <see cref="IBodyPart"/> this <see cref="ISurgeryData"/>
/// Returns whether the given <see cref="SharedBodyPartComponent"/> can be connected
/// to the <see cref="SharedBodyPartComponent"/> this <see cref="ISurgeryData"/>
/// represents.
/// </summary>
public bool CanAttachBodyPart(IBodyPart part);
public bool CanAttachBodyPart(SharedBodyPartComponent part);
/// <summary>
/// Gets the delegate corresponding to the surgery step using the given
@@ -56,7 +56,7 @@ namespace Content.Shared.Body.Surgery
/// <summary>
/// Returns whether the given <see cref="SurgeryType"/> can be used to
/// perform a surgery on the <see cref="IBodyPart"/> this
/// perform a surgery on the <see cref="SharedBodyPartComponent"/> this
/// <see cref="ISurgeryData"/> represents.
/// </summary>
public bool CheckSurgery(SurgeryType toolType)