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

@@ -64,7 +64,7 @@ namespace Content.Server.Morgue.Components
protected override bool AddToContents(IEntity entity)
{
if (entity.HasComponent<IBody>() && !EntitySystem.Get<StandingStateSystem>().IsDown(entity)) return false;
if (entity.HasComponent<SharedBodyComponent>() && !EntitySystem.Get<StandingStateSystem>().IsDown(entity)) return false;
return base.AddToContents(entity);
}
@@ -115,7 +115,7 @@ namespace Content.Server.Morgue.Components
foreach (var entity in Contents.ContainedEntities)
{
count++;
if (!hasMob && entity.HasComponent<IBody>()) hasMob = true;
if (!hasMob && entity.HasComponent<SharedBodyComponent>()) hasMob = true;
if (!hasSoul && entity.TryGetComponent<ActorComponent>(out var actor) && actor.PlayerSession != null) hasSoul = true;
}
Appearance?.SetData(MorgueVisuals.HasContents, count > 0);