diff --git a/Content.Client/Body/Systems/BodySystem.cs b/Content.Client/Body/Systems/BodySystem.cs new file mode 100644 index 00000000000..bab785525b0 --- /dev/null +++ b/Content.Client/Body/Systems/BodySystem.cs @@ -0,0 +1,7 @@ +using Content.Shared.Body.Systems; + +namespace Content.Client.Body.Systems; + +public sealed class BodySystem : SharedBodySystem +{ +} diff --git a/Content.Client/Buckle/BuckleSystem.cs b/Content.Client/Buckle/BuckleSystem.cs index bc33081c992..a71e4c10a84 100644 --- a/Content.Client/Buckle/BuckleSystem.cs +++ b/Content.Client/Buckle/BuckleSystem.cs @@ -65,7 +65,7 @@ private void OnAppearanceChange(EntityUid uid, BuckleComponent component, ref Ap !buckled || args.Sprite == null) { - // CorvaxNext: Laying System + // _CorvaxNext: Laying System //_rotationVisualizerSystem.SetHorizontalAngle((uid, rotVisuals), rotVisuals.DefaultRotation); return; } diff --git a/Content.Client/Hands/Systems/HandsSystem.cs b/Content.Client/Hands/Systems/HandsSystem.cs index 7b55f66e699..68800a2afe5 100644 --- a/Content.Client/Hands/Systems/HandsSystem.cs +++ b/Content.Client/Hands/Systems/HandsSystem.cs @@ -4,8 +4,6 @@ using Content.Client.Examine; using Content.Client.Strip; using Content.Client.Verbs.UI; -using Content.Shared._CorvaxNext.Surgery.Body.Events; -using Content.Shared.Body.Part; using Content.Shared.Hands; using Content.Shared.Hands.Components; using Content.Shared.Hands.EntitySystems; @@ -42,6 +40,7 @@ public sealed class HandsSystem : SharedHandsSystem public event Action? OnPlayerItemRemoved; public event Action? OnPlayerHandBlocked; public event Action? OnPlayerHandUnblocked; + public override void Initialize() { base.Initialize(); @@ -52,8 +51,6 @@ public override void Initialize() SubscribeLocalEvent(OnHandsShutdown); SubscribeLocalEvent(HandleComponentState); SubscribeLocalEvent(OnVisualsChanged); - SubscribeLocalEvent(HandleBodyPartRemoved); // CorvaxNext: surgery - SubscribeLocalEvent(HandleBodyPartDisabled); // CorvaxNext: surgery OnHandSetActive += OnHandActivated; } @@ -241,40 +238,8 @@ public void UIHandAltActivateItem(string handName) RaisePredictiveEvent(new RequestHandAltInteractEvent(handName)); } - #region pulling - - #endregion - #region visuals - // start-_CorvaxNext: surgery - private void HideLayers(EntityUid uid, HandsComponent component, Entity part, SpriteComponent? sprite = null) - { - if (part.Comp.PartType != BodyPartType.Hand || !Resolve(uid, ref sprite, logMissing: false)) - return; - - var location = part.Comp.Symmetry switch - { - BodyPartSymmetry.None => HandLocation.Middle, - BodyPartSymmetry.Left => HandLocation.Left, - BodyPartSymmetry.Right => HandLocation.Right, - _ => throw new ArgumentOutOfRangeException(nameof(part.Comp.Symmetry)) - }; - - if (component.RevealedLayers.TryGetValue(location, out var revealedLayers)) - { - foreach (var key in revealedLayers) - sprite.RemoveLayer(key); - - revealedLayers.Clear(); - } - } - - private void HandleBodyPartRemoved(EntityUid uid, HandsComponent component, ref BodyPartRemovedEvent args) => HideLayers(uid, component, args.Part); - - private void HandleBodyPartDisabled(EntityUid uid, HandsComponent component, ref BodyPartDisabledEvent args) => HideLayers(uid, component, args.Part); - // end-_CorvaxNext: surgery - protected override void HandleEntityInserted(EntityUid uid, HandsComponent hands, EntInsertedIntoContainerMessage args) { base.HandleEntityInserted(uid, hands, args); @@ -299,7 +264,6 @@ protected override void HandleEntityRemoved(EntityUid uid, HandsComponent hands, if (!hands.Hands.TryGetValue(args.Container.ID, out var hand)) return; - UpdateHandVisuals(uid, args.Entity, hand); _stripSys.UpdateUi(uid); diff --git a/Content.Client/HealthAnalyzer/UI/HealthAnalyzerBoundUserInterface.cs b/Content.Client/HealthAnalyzer/UI/HealthAnalyzerBoundUserInterface.cs index e2c75c4b391..baea03c8923 100644 --- a/Content.Client/HealthAnalyzer/UI/HealthAnalyzerBoundUserInterface.cs +++ b/Content.Client/HealthAnalyzer/UI/HealthAnalyzerBoundUserInterface.cs @@ -1,7 +1,6 @@ using Content.Shared.MedicalScanner; -using Content.Shared._CorvaxNext.Targeting; using JetBrains.Annotations; -using Robust.Client.GameObjects; +using Robust.Client.UserInterface; namespace Content.Client.HealthAnalyzer.UI { @@ -18,13 +17,10 @@ public HealthAnalyzerBoundUserInterface(EntityUid owner, Enum uiKey) : base(owne protected override void Open() { base.Open(); - _window = new HealthAnalyzerWindow - { - Title = EntMan.GetComponent(Owner).EntityName, - }; - _window.OnClose += Close; - _window.OnBodyPartSelected += SendBodyPartMessage; - _window.OpenCentered(); + + _window = this.CreateWindow(); + + _window.Title = EntMan.GetComponent(Owner).EntityName; } protected override void ReceiveMessage(BoundUserInterfaceMessage message) @@ -37,22 +33,5 @@ protected override void ReceiveMessage(BoundUserInterfaceMessage message) _window.Populate(cast); } - - private void SendBodyPartMessage(TargetBodyPart? part, EntityUid target) => SendMessage(new HealthAnalyzerPartMessage(EntMan.GetNetEntity(target), part ?? null)); - - protected override void Dispose(bool disposing) - { - base.Dispose(disposing); - if (!disposing) - return; - - if (_window != null) - { - _window.OnClose -= Close; - _window.OnBodyPartSelected -= SendBodyPartMessage; - } - - _window?.Dispose(); - } } } diff --git a/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml b/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml index 0a0b5ac89e7..aae8785b1fe 100644 --- a/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml +++ b/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml @@ -1,8 +1,8 @@ - + MinWidth="300">