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

@@ -37,7 +37,7 @@ namespace Content.Shared.Body.Slot
/// The part currently in this slot, if any.
/// </summary>
[ViewVariables]
public IBodyPart? Part { get; private set; }
public SharedBodyPartComponent? Part { get; private set; }
/// <summary>
/// List of slots that this slot connects to.
@@ -45,21 +45,21 @@ namespace Content.Shared.Body.Slot
[ViewVariables]
public HashSet<BodyPartSlot> Connections { get; private set; }
public event Action<IBodyPart>? PartAdded;
public event Action<SharedBodyPartComponent>? PartAdded;
public event Action<IBodyPart>? PartRemoved;
public event Action<SharedBodyPartComponent>? PartRemoved;
internal void SetConnectionsInternal(IEnumerable<BodyPartSlot> connections)
{
Connections = new HashSet<BodyPartSlot>(connections);
}
public bool CanAddPart(IBodyPart part)
public bool CanAddPart(SharedBodyPartComponent part)
{
return Part == null && part.PartType == PartType;
}
public bool TryAddPart(IBodyPart part)
public bool TryAddPart(SharedBodyPartComponent part)
{
if (!CanAddPart(part))
{
@@ -70,7 +70,7 @@ namespace Content.Shared.Body.Slot
return true;
}
public void SetPart(IBodyPart part)
public void SetPart(SharedBodyPartComponent part)
{
if (Part != null)
{