Remove health analyzer component references (#15322)

This commit is contained in:
DrSmugleaf
2023-04-11 17:11:02 -07:00
committed by GitHub
parent 92eda47e14
commit f474171451
9 changed files with 47 additions and 48 deletions

View File

@@ -1,8 +1,7 @@
using JetBrains.Annotations; using Content.Shared.MedicalScanner;
using JetBrains.Annotations;
using Robust.Client.GameObjects; using Robust.Client.GameObjects;
using static Content.Shared.MedicalScanner.SharedHealthAnalyzerComponent;
namespace Content.Client.HealthAnalyzer.UI namespace Content.Client.HealthAnalyzer.UI
{ {
[UsedImplicitly] [UsedImplicitly]

View File

@@ -1,14 +1,14 @@
using System.Text;
using Content.Shared.Damage; using Content.Shared.Damage;
using Content.Shared.Damage.Prototypes; using Content.Shared.Damage.Prototypes;
using Content.Shared.Disease.Components; using Content.Shared.Disease.Components;
using Content.Shared.FixedPoint; using Content.Shared.FixedPoint;
using Content.Shared.IdentityManagement; using Content.Shared.IdentityManagement;
using Content.Shared.MedicalScanner;
using Robust.Client.AutoGenerated; using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.CustomControls; using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML; using Robust.Client.UserInterface.XAML;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using System.Text;
using static Content.Shared.MedicalScanner.SharedHealthAnalyzerComponent;
namespace Content.Client.HealthAnalyzer.UI namespace Content.Client.HealthAnalyzer.UI
{ {

View File

@@ -1,4 +1,3 @@
using System.Threading;
using Content.Server.UserInterface; using Content.Server.UserInterface;
using Content.Shared.Disease; using Content.Shared.Disease;
using Content.Shared.MedicalScanner; 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. /// After scanning, retrieves the target Uid to use with its related UI.
/// </summary> /// </summary>
[RegisterComponent] [RegisterComponent]
[ComponentReference(typeof(SharedHealthAnalyzerComponent))] public sealed class HealthAnalyzerComponent : Component
public sealed class HealthAnalyzerComponent : SharedHealthAnalyzerComponent
{ {
/// <summary> /// <summary>
/// How long it takes to scan someone. /// How long it takes to scan someone.
@@ -27,13 +25,13 @@ namespace Content.Server.Medical.Components
/// Sound played on scanning begin /// Sound played on scanning begin
/// </summary> /// </summary>
[DataField("scanningBeginSound")] [DataField("scanningBeginSound")]
public SoundSpecifier? ScanningBeginSound = null; public SoundSpecifier? ScanningBeginSound;
/// <summary> /// <summary>
/// Sound played on scanning end /// Sound played on scanning end
/// </summary> /// </summary>
[DataField("scanningEndSound")] [DataField("scanningEndSound")]
public SoundSpecifier? ScanningEndSound = null; public SoundSpecifier? ScanningEndSound;
/// <summary> /// <summary>
/// The disease this will give people. /// The disease this will give people.

View File

@@ -165,8 +165,8 @@ public sealed partial class CryoPodSystem: SharedCryoPodSystem
{ {
_userInterfaceSystem.TrySendUiMessage( _userInterfaceSystem.TrySendUiMessage(
uid, uid,
SharedHealthAnalyzerComponent.HealthAnalyzerUiKey.Key, HealthAnalyzerUiKey.Key,
new SharedHealthAnalyzerComponent.HealthAnalyzerScannedUserMessage(cryoPodComponent.BodyContainer.ContainedEntity)); new HealthAnalyzerScannedUserMessage(cryoPodComponent.BodyContainer.ContainedEntity));
} }
private void OnInteractUsing(EntityUid uid, CryoPodComponent cryoPodComponent, InteractUsingEvent args) private void OnInteractUsing(EntityUid uid, CryoPodComponent cryoPodComponent, InteractUsingEvent args)
@@ -205,7 +205,7 @@ public sealed partial class CryoPodSystem: SharedCryoPodSystem
else else
{ {
RemComp<ActiveCryoPodComponent>(uid); RemComp<ActiveCryoPodComponent>(uid);
_uiSystem.TryCloseAll(uid, SharedHealthAnalyzerComponent.HealthAnalyzerUiKey.Key); _uiSystem.TryCloseAll(uid, HealthAnalyzerUiKey.Key);
} }
UpdateAppearance(uid, component); UpdateAppearance(uid, component);
} }

View File

@@ -1,5 +1,5 @@
using Content.Server.Medical.Components;
using Content.Server.Disease; using Content.Server.Disease;
using Content.Server.Medical.Components;
using Content.Server.Popups; using Content.Server.Popups;
using Content.Shared.Damage; using Content.Shared.Damage;
using Content.Shared.DoAfter; using Content.Shared.DoAfter;
@@ -8,7 +8,6 @@ using Content.Shared.Interaction;
using Content.Shared.MedicalScanner; using Content.Shared.MedicalScanner;
using Content.Shared.Mobs.Components; using Content.Shared.Mobs.Components;
using Robust.Server.GameObjects; using Robust.Server.GameObjects;
using static Content.Shared.MedicalScanner.SharedHealthAnalyzerComponent;
namespace Content.Server.Medical namespace Content.Server.Medical
{ {

View File

@@ -0,0 +1,9 @@
using Content.Shared.DoAfter;
using Robust.Shared.Serialization;
namespace Content.Shared.MedicalScanner;
[Serializable, NetSerializable]
public sealed class HealthAnalyzerDoAfterEvent : SimpleDoAfterEvent
{
}

View File

@@ -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;
}
}

View File

@@ -0,0 +1,9 @@
using Robust.Shared.Serialization;
namespace Content.Shared.MedicalScanner;
[Serializable, NetSerializable]
public enum HealthAnalyzerUiKey : byte
{
Key
}

View File

@@ -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
{
}
}