#nullable enable using System.Collections.Generic; using Content.Shared.GameObjects.Components.Body.Mechanism; using Content.Shared.GameObjects.Components.Body.Surgery; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Map; namespace Content.Shared.GameObjects.Components.Body.Part { public interface IBodyPart : IComponent, IBodyPartContainer { IBody? Body { get; set; } /// /// that this is considered /// to be. /// For example, . /// BodyPartType PartType { get; } /// /// Determines many things: how many mechanisms can be fit inside this /// , whether a body can fit through tiny crevices, /// etc. /// int Size { get; } // TODO BODY Mechanisms occupying different parts at the body level /// /// Collection of all s currently inside this /// . /// To add and remove from this list see and /// /// IReadOnlyCollection Mechanisms { get; } /// /// If body part is vital /// public bool IsVital { get; } public BodyPartSymmetry Symmetry { get; } /// /// Checks if the given can be used on /// the current state of this . /// /// True if it can be used, false otherwise. bool SurgeryCheck(SurgeryType surgery); /// /// Attempts to perform surgery on this with the given /// tool. /// /// True if successful, false if there was an error. public bool AttemptSurgery(SurgeryType toolType, IBodyPartContainer target, ISurgeon surgeon, IEntity performer); /// /// Checks if another can be connected to this one. /// /// The part to connect. /// True if it can be connected, false otherwise. bool CanAttachPart(IBodyPart part); /// /// Checks if a can be added on this /// . /// /// True if it can be added, false otherwise. bool CanAddMechanism(IMechanism mechanism); bool TryAddMechanism(IMechanism mechanism, bool force = false); /// /// Tries to remove the given from this /// . /// /// The mechanism to remove. /// True if it was removed, false otherwise. bool RemoveMechanism(IMechanism mechanism); /// /// Tries to remove the given from this /// and drops it at the specified coordinates. /// /// The mechanism to remove. /// The coordinates to drop it at. /// True if it was removed, false otherwise. bool RemoveMechanism(IMechanism mechanism, EntityCoordinates dropAt); /// /// Tries to destroy the given from /// this . /// The mechanism won't be deleted if it is not in this body part. /// /// /// True if the mechanism was in this body part and destroyed, /// false otherwise. /// bool DeleteMechanism(IMechanism mechanism); } }