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

@@ -69,7 +69,7 @@ namespace Content.Server.Recycling.Components
private bool CanGib(IEntity entity)
{
// We suppose this entity has a Recyclable component.
return entity.HasComponent<IBody>() && !_safe && Powered;
return entity.HasComponent<SharedBodyComponent>() && !_safe && Powered;
}
private void Recycle(IEntity entity)
@@ -87,7 +87,7 @@ namespace Content.Server.Recycling.Components
// Mobs are a special case!
if (CanGib(entity))
{
entity.GetComponent<IBody>().Gib(true);
entity.GetComponent<SharedBodyComponent>().Gib(true);
Bloodstain();
return;
}
@@ -159,7 +159,7 @@ namespace Content.Server.Recycling.Components
victim.PopupMessageOtherClients(Loc.GetString("{0:theName} tries to recycle {0:themself}!", victim));
if (victim.TryGetComponent<IBody>(out var body))
if (victim.TryGetComponent<SharedBodyComponent>(out var body))
{
body.Gib(true);
}