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

@@ -122,7 +122,7 @@ namespace Content.Server.Body.Commands
}
}
if (!entity.TryGetComponent(out IBody? body))
if (!entity.TryGetComponent(out SharedBodyComponent? body))
{
var random = IoCManager.Resolve<IRobustRandom>();
var text = $"You have no body{(random.Prob(0.2f) ? " and you must scream." : ".")}";
@@ -131,9 +131,9 @@ namespace Content.Server.Body.Commands
return;
}
if (!hand.TryGetComponent(out IBodyPart? part))
if (!hand.TryGetComponent(out SharedBodyPartComponent? part))
{
shell.WriteLine($"Hand entity {hand} does not have a {nameof(IBodyPart)} component.");
shell.WriteLine($"Hand entity {hand} does not have a {nameof(SharedBodyPartComponent)} component.");
return;
}

View File

@@ -76,9 +76,9 @@ namespace Content.Server.Body.Commands
return;
}
if (!entity.TryGetComponent(out IBody? body))
if (!entity.TryGetComponent(out SharedBodyComponent? body))
{
shell.WriteLine($"Entity {entity.Name} with uid {entity.Uid} does not have a {nameof(IBody)} component.");
shell.WriteLine($"Entity {entity.Name} with uid {entity.Uid} does not have a {nameof(SharedBodyComponent)} component.");
return;
}
@@ -88,9 +88,9 @@ namespace Content.Server.Body.Commands
return;
}
if (!partEntity.TryGetComponent(out IBodyPart? part))
if (!partEntity.TryGetComponent(out SharedBodyPartComponent? part))
{
shell.WriteLine($"Entity {partEntity.Name} with uid {args[0]} does not have a {nameof(IBodyPart)} component.");
shell.WriteLine($"Entity {partEntity.Name} with uid {args[0]} does not have a {nameof(SharedBodyPartComponent)} component.");
return;
}

View File

@@ -37,7 +37,7 @@ namespace Content.Server.Body.Commands
return;
}
if (!player.AttachedEntity.TryGetComponent(out IBody? body))
if (!player.AttachedEntity.TryGetComponent(out SharedBodyComponent? body))
{
var random = IoCManager.Resolve<IRobustRandom>();
var text = $"You have no body{(random.Prob(0.2f) ? " and you must scream." : ".")}";

View File

@@ -33,7 +33,7 @@ namespace Content.Server.Body.Commands
return;
}
if (!player.AttachedEntity.TryGetComponent(out IBody? body))
if (!player.AttachedEntity.TryGetComponent(out SharedBodyComponent? body))
{
var random = IoCManager.Resolve<IRobustRandom>();
var text = $"You have no body{(random.Prob(0.2f) ? " and you must scream." : ".")}";