#nullable enable using Content.Shared.GameObjects.Components.Body.Mechanism; using Content.Shared.GameObjects.Components.Body.Part; using Robust.Shared.Interfaces.GameObjects; namespace Content.Shared.GameObjects.Components.Body.Surgery { /// /// Represents the current surgery state of a . /// public interface ISurgeryData : IComponent { public delegate void SurgeryAction(IBodyPartContainer container, ISurgeon surgeon, IEntity performer); /// /// The this /// is attached to. /// public IBodyPart? Parent { get; } /// /// The of the parent /// . /// public BodyPartType? ParentType { get; } /// /// Returns a description of this entity. /// /// The description shown upon observing this entity. public string GetDescription(); /// /// Returns whether a can be added into the /// this /// represents. /// public bool CanAddMechanism(IMechanism mechanism); /// /// Returns whether the given can be connected /// to the this /// represents. /// public bool CanAttachBodyPart(IBodyPart part); /// /// Gets the delegate corresponding to the surgery step using the given /// . /// /// /// The corresponding surgery action or null if no step can be /// performed. /// public SurgeryAction? GetSurgeryStep(SurgeryType toolType); /// /// Returns whether the given can be used to /// perform a surgery on the this /// represents. /// public bool CheckSurgery(SurgeryType toolType) { return GetSurgeryStep(toolType) != null; } /// /// Attempts to perform surgery of the given . /// /// /// The used for this surgery. /// /// /// The container where the surgery is being done. /// /// /// The entity being used to perform the surgery. /// /// The entity performing the surgery. /// True if successful, false otherwise. public bool PerformSurgery(SurgeryType surgeryType, IBodyPartContainer container, ISurgeon surgeon, IEntity performer); } }