Remove IBody, IBodyPart, IMechanism and IMechanismBehavior (#4187)
* Remove IBody, IBodyPart, IMechanism and IMechanismBehavior interfaces * Summary cleanup
This commit is contained in:
@@ -20,7 +20,6 @@ namespace Content.Server.Body.Mechanism
|
||||
{
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(SharedMechanismComponent))]
|
||||
[ComponentReference(typeof(IMechanism))]
|
||||
public class MechanismComponent : SharedMechanismComponent, IAfterInteract
|
||||
{
|
||||
[ViewVariables] private BoundUserInterface? UserInterface => Owner.GetUIOrNull(SurgeryUIKey.Key);
|
||||
@@ -47,11 +46,11 @@ namespace Content.Server.Body.Mechanism
|
||||
PerformerCache = null;
|
||||
BodyCache = null;
|
||||
|
||||
if (eventArgs.Target.TryGetComponent(out IBody? body))
|
||||
if (eventArgs.Target.TryGetComponent(out SharedBodyComponent? body))
|
||||
{
|
||||
SendBodyPartListToUser(eventArgs, body);
|
||||
}
|
||||
else if (eventArgs.Target.TryGetComponent<IBodyPart>(out var part))
|
||||
else if (eventArgs.Target.TryGetComponent<SharedBodyPartComponent>(out var part))
|
||||
{
|
||||
DebugTools.AssertNotNull(part);
|
||||
|
||||
@@ -64,7 +63,7 @@ namespace Content.Server.Body.Mechanism
|
||||
return true;
|
||||
}
|
||||
|
||||
private void SendBodyPartListToUser(AfterInteractEventArgs eventArgs, IBody body)
|
||||
private void SendBodyPartListToUser(AfterInteractEventArgs eventArgs, SharedBodyComponent body)
|
||||
{
|
||||
// Create dictionary to send to client (text to be shown : data sent back if selected)
|
||||
var toSend = new Dictionary<string, int>();
|
||||
@@ -120,7 +119,7 @@ namespace Content.Server.Body.Mechanism
|
||||
return;
|
||||
}
|
||||
|
||||
var target = (IBodyPart) targetObject;
|
||||
var target = (SharedBodyPartComponent) targetObject;
|
||||
var message = target.TryAddMechanism(this)
|
||||
? Loc.GetString("You jam {0:theName} inside {1:them}.", Owner, PerformerCache)
|
||||
: Loc.GetString("You can't fit it in!");
|
||||
|
||||
Reference in New Issue
Block a user