Remove IBody, IBodyPart, IMechanism and IMechanismBehavior (#4187)
* Remove IBody, IBodyPart, IMechanism and IMechanismBehavior interfaces * Summary cleanup
This commit is contained in:
@@ -5,7 +5,7 @@ using Robust.Shared.GameObjects;
|
||||
namespace Content.Client.Body.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(IBody))]
|
||||
[ComponentReference(typeof(SharedBodyComponent))]
|
||||
public class BodyComponent : SharedBodyComponent, IDraggable
|
||||
{
|
||||
bool IDraggable.CanStartDrag(StartDragDropEvent args)
|
||||
|
||||
@@ -5,7 +5,6 @@ namespace Content.Client.Body.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(SharedBodyPartComponent))]
|
||||
[ComponentReference(typeof(IBodyPart))]
|
||||
public class BodyPartComponent : SharedBodyPartComponent
|
||||
{
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace Content.Client.Body.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(SharedMechanismComponent))]
|
||||
[ComponentReference(typeof(IMechanism))]
|
||||
public class MechanismComponent : SharedMechanismComponent { }
|
||||
public class MechanismComponent : SharedMechanismComponent
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,9 +15,9 @@ namespace Content.Client.Body.UI
|
||||
public sealed class BodyScannerDisplay : SS14Window
|
||||
{
|
||||
private IEntity? _currentEntity;
|
||||
private IBodyPart? _currentBodyPart;
|
||||
private SharedBodyPartComponent? _currentBodyPart;
|
||||
|
||||
private IBody? CurrentBody => _currentEntity?.GetComponentOrNull<IBody>();
|
||||
private SharedBodyComponent? CurrentBody => _currentEntity?.GetComponentOrNull<SharedBodyComponent>();
|
||||
|
||||
public BodyScannerDisplay(BodyScannerBoundUserInterface owner)
|
||||
{
|
||||
@@ -137,7 +137,7 @@ namespace Content.Client.Body.UI
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateBodyPartBox(IBodyPart part, string slotName)
|
||||
private void UpdateBodyPartBox(SharedBodyPartComponent part, string slotName)
|
||||
{
|
||||
BodyPartLabel.Text = $"{Loc.GetString(slotName)}: {Loc.GetString(part.Owner.Name)}";
|
||||
|
||||
@@ -161,7 +161,7 @@ namespace Content.Client.Body.UI
|
||||
UpdateMechanismBox(_currentBodyPart?.Mechanisms.ElementAt(args.ItemIndex));
|
||||
}
|
||||
|
||||
private void UpdateMechanismBox(IMechanism? mechanism)
|
||||
private void UpdateMechanismBox(SharedMechanismComponent? mechanism)
|
||||
{
|
||||
// TODO BODY Improve UI
|
||||
if (mechanism == null)
|
||||
|
||||
Reference in New Issue
Block a user