]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Remove health analyzer component references (#15322)
authorDrSmugleaf <DrSmugleaf@users.noreply.github.com>
Wed, 12 Apr 2023 00:11:02 +0000 (17:11 -0700)
committerGitHub <noreply@github.com>
Wed, 12 Apr 2023 00:11:02 +0000 (17:11 -0700)
Content.Client/HealthAnalyzer/UI/HealthAnalyzerBoundUserInterface.cs
Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs
Content.Server/Medical/Components/HealthAnalyzerComponent.cs
Content.Server/Medical/CryoPodSystem.cs
Content.Server/Medical/HealthAnalyzerSystem.cs
Content.Shared/MedicalScanner/HealthAnalyzerDoAfterEvent.cs [new file with mode: 0644]
Content.Shared/MedicalScanner/HealthAnalyzerScannedUserMessage.cs [new file with mode: 0644]
Content.Shared/MedicalScanner/HealthAnalyzerUiKey.cs [new file with mode: 0644]
Content.Shared/MedicalScanner/SharedHealthAnalyzerComponent.cs [deleted file]

index a5dbe2d7dc69765af3e7e6bb863c00347bd73498..052726de3a1efccd39306b2f9083399f3790ee4c 100644 (file)
@@ -1,8 +1,7 @@
-using JetBrains.Annotations;
+using Content.Shared.MedicalScanner;
+using JetBrains.Annotations;
 using Robust.Client.GameObjects;
 
-using static Content.Shared.MedicalScanner.SharedHealthAnalyzerComponent;
-
 namespace Content.Client.HealthAnalyzer.UI
 {
     [UsedImplicitly]
index 2a7afdd7163360f65dd866b1043360eba8044e8f..1edd61b766fb8d12e623456494d354809a1fb479 100644 (file)
@@ -1,14 +1,14 @@
+using System.Text;
 using Content.Shared.Damage;
 using Content.Shared.Damage.Prototypes;
 using Content.Shared.Disease.Components;
 using Content.Shared.FixedPoint;
 using Content.Shared.IdentityManagement;
+using Content.Shared.MedicalScanner;
 using Robust.Client.AutoGenerated;
 using Robust.Client.UserInterface.CustomControls;
 using Robust.Client.UserInterface.XAML;
 using Robust.Shared.Prototypes;
-using System.Text;
-using static Content.Shared.MedicalScanner.SharedHealthAnalyzerComponent;
 
 namespace Content.Client.HealthAnalyzer.UI
 {
index 793b6e628dc8691b63b913895959b4f7557f33a3..150d62c89f80d5d4dcf0bd2bad843475919a107e 100644 (file)
@@ -1,4 +1,3 @@
-using System.Threading;
 using Content.Server.UserInterface;
 using Content.Shared.Disease;
 using Content.Shared.MedicalScanner;
@@ -12,8 +11,7 @@ namespace Content.Server.Medical.Components
     ///    After scanning, retrieves the target Uid to use with its related UI.
     /// </summary>
     [RegisterComponent]
-    [ComponentReference(typeof(SharedHealthAnalyzerComponent))]
-    public sealed class HealthAnalyzerComponent : SharedHealthAnalyzerComponent
+    public sealed class HealthAnalyzerComponent : Component
     {
         /// <summary>
         /// How long it takes to scan someone.
@@ -27,13 +25,13 @@ namespace Content.Server.Medical.Components
         ///     Sound played on scanning begin
         /// </summary>
         [DataField("scanningBeginSound")]
-        public SoundSpecifier? ScanningBeginSound = null;
+        public SoundSpecifier? ScanningBeginSound;
 
         /// <summary>
         ///     Sound played on scanning end
         /// </summary>
         [DataField("scanningEndSound")]
-        public SoundSpecifier? ScanningEndSound = null;
+        public SoundSpecifier? ScanningEndSound;
 
         /// <summary>
         /// The disease this will give people.
index e45f2f920f9f08313d56da784882187295d173b6..52fdad6018b5e6035290bf33bcf06a514b651630 100644 (file)
@@ -165,8 +165,8 @@ public sealed partial class CryoPodSystem: SharedCryoPodSystem
     {
         _userInterfaceSystem.TrySendUiMessage(
             uid,
-            SharedHealthAnalyzerComponent.HealthAnalyzerUiKey.Key,
-            new SharedHealthAnalyzerComponent.HealthAnalyzerScannedUserMessage(cryoPodComponent.BodyContainer.ContainedEntity));
+            HealthAnalyzerUiKey.Key,
+            new HealthAnalyzerScannedUserMessage(cryoPodComponent.BodyContainer.ContainedEntity));
     }
 
     private void OnInteractUsing(EntityUid uid, CryoPodComponent cryoPodComponent, InteractUsingEvent args)
@@ -205,7 +205,7 @@ public sealed partial class CryoPodSystem: SharedCryoPodSystem
         else
         {
             RemComp<ActiveCryoPodComponent>(uid);
-            _uiSystem.TryCloseAll(uid, SharedHealthAnalyzerComponent.HealthAnalyzerUiKey.Key);
+            _uiSystem.TryCloseAll(uid, HealthAnalyzerUiKey.Key);
         }
         UpdateAppearance(uid, component);
     }
index 67fa2ebac8bf6a1788f8d4eda03540f1d70467a8..197656ab702923a55c245fcfa2bcb6f4a89299c8 100644 (file)
@@ -1,5 +1,5 @@
-using Content.Server.Medical.Components;
 using Content.Server.Disease;
+using Content.Server.Medical.Components;
 using Content.Server.Popups;
 using Content.Shared.Damage;
 using Content.Shared.DoAfter;
@@ -8,7 +8,6 @@ using Content.Shared.Interaction;
 using Content.Shared.MedicalScanner;
 using Content.Shared.Mobs.Components;
 using Robust.Server.GameObjects;
-using static Content.Shared.MedicalScanner.SharedHealthAnalyzerComponent;
 
 namespace Content.Server.Medical
 {
diff --git a/Content.Shared/MedicalScanner/HealthAnalyzerDoAfterEvent.cs b/Content.Shared/MedicalScanner/HealthAnalyzerDoAfterEvent.cs
new file mode 100644 (file)
index 0000000..ca2fea6
--- /dev/null
@@ -0,0 +1,9 @@
+using Content.Shared.DoAfter;
+using Robust.Shared.Serialization;
+
+namespace Content.Shared.MedicalScanner;
+
+[Serializable, NetSerializable]
+public sealed class HealthAnalyzerDoAfterEvent : SimpleDoAfterEvent
+{
+}
diff --git a/Content.Shared/MedicalScanner/HealthAnalyzerScannedUserMessage.cs b/Content.Shared/MedicalScanner/HealthAnalyzerScannedUserMessage.cs
new file mode 100644 (file)
index 0000000..1dd0096
--- /dev/null
@@ -0,0 +1,18 @@
+using Robust.Shared.Serialization;
+
+namespace Content.Shared.MedicalScanner;
+
+/// <summary>
+///     On interacting with an entity retrieves the entity UID for use with getting the current damage of the mob.
+/// </summary>
+[Serializable, NetSerializable]
+public sealed class HealthAnalyzerScannedUserMessage : BoundUserInterfaceMessage
+{
+    public readonly EntityUid? TargetEntity;
+
+    public HealthAnalyzerScannedUserMessage(EntityUid? targetEntity)
+    {
+        TargetEntity = targetEntity;
+    }
+}
+
diff --git a/Content.Shared/MedicalScanner/HealthAnalyzerUiKey.cs b/Content.Shared/MedicalScanner/HealthAnalyzerUiKey.cs
new file mode 100644 (file)
index 0000000..3b42d5e
--- /dev/null
@@ -0,0 +1,9 @@
+using Robust.Shared.Serialization;
+
+namespace Content.Shared.MedicalScanner;
+
+[Serializable, NetSerializable]
+public enum HealthAnalyzerUiKey : byte
+{
+    Key
+}
diff --git a/Content.Shared/MedicalScanner/SharedHealthAnalyzerComponent.cs b/Content.Shared/MedicalScanner/SharedHealthAnalyzerComponent.cs
deleted file mode 100644 (file)
index 7129111..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-using Content.Shared.DoAfter;
-using Robust.Shared.Serialization;
-
-namespace Content.Shared.MedicalScanner
-{
-    public abstract class SharedHealthAnalyzerComponent : Component
-    {
-        /// <summary>
-        ///     On interacting with an entity retrieves the entity UID for use with getting the current damage of the mob.
-        /// </summary>
-        [Serializable, NetSerializable]
-        public sealed class HealthAnalyzerScannedUserMessage : BoundUserInterfaceMessage
-        {
-            public readonly EntityUid? TargetEntity;
-
-            public HealthAnalyzerScannedUserMessage(EntityUid? targetEntity)
-            {
-                TargetEntity = targetEntity;
-            }
-        }
-
-        [Serializable, NetSerializable]
-        public enum HealthAnalyzerUiKey : byte
-        {
-            Key
-        }
-    }
-
-    [Serializable, NetSerializable]
-    public sealed class HealthAnalyzerDoAfterEvent : SimpleDoAfterEvent
-    {
-    }
-}