#nullable enable
using System.Collections.Generic;
using Content.Shared.GameObjects.Components.Body.Mechanism;
using Content.Shared.GameObjects.Components.Body.Surgery;
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
namespace Content.Shared.GameObjects.Components.Body.Part
{
public interface IBodyPart : IComponent, IBodyPartContainer
{
///
/// The to which this is
/// attached to.
///
IBody? Body { get; set; }
///
/// that this is considered
/// to be.
/// For example, .
///
BodyPartType PartType { get; }
///
/// Determines how many mechanisms can be fit inside this
/// .
///
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; }
///
/// Whether or not the owning will die if all
/// s of this type are removed from it.
///
public bool IsVital { get; }
///
/// The symmetry of this .
///
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);
///
/// Tries to add a to this body.
///
/// The mechanism to add.
///
/// Whether or not to check if the mechanism is compatible.
/// Passing true does not guarantee it to be added, for example if
/// it was already added before.
///
/// true if added, false otherwise even if it was already added.
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);
///
/// Gibs the body part.
///
void Gib();
}
}