using Content.Server.UserInterface; using Content.Shared.Body.Components; using Robust.Server.GameObjects; namespace Content.Server.Body.Components { [RegisterComponent] [ComponentReference(typeof(SharedBodyScannerComponent))] public sealed class BodyScannerComponent : SharedBodyScannerComponent { [ViewVariables] private BoundUserInterface? UserInterface => Owner.GetUIOrNull(BodyScannerUiKey.Key); protected override void Initialize() { base.Initialize(); Owner.EnsureComponentWarn(); if (UserInterface != null) { UserInterface.OnReceiveMessage += UserInterfaceOnOnReceiveMessage; } } private void UserInterfaceOnOnReceiveMessage(ServerBoundUserInterfaceMessage serverMsg) { } /// /// Copy BodyTemplate and BodyPart data into a common data class that the client can read. /// private BodyScannerUIState InterfaceState(BodyComponent body) { return new(body.Owner); } } }