adds both blood level and body temp to analyzers and cryo (#16778)

* Ports temperature scanning from mining station 14

* Added blood level to analyzer

* adds body temp and blood level to health analyzers and cryo

* Blood and temperature will show N/A if not available
This commit is contained in:
Whisper
2023-07-18 17:13:26 -04:00
committed by GitHub
parent 4a3831c7b1
commit 301fbffcfd
4 changed files with 27 additions and 4 deletions

View File

@@ -31,6 +31,7 @@ using Content.Shared.Tools;
using Content.Shared.Verbs;
using Robust.Server.GameObjects;
using Robust.Shared.Timing;
using Content.Server.Temperature.Components;
namespace Content.Server.Medical;
@@ -177,10 +178,14 @@ public sealed partial class CryoPodSystem: SharedCryoPodSystem
private void OnActivateUI(EntityUid uid, CryoPodComponent cryoPodComponent, AfterActivatableUIOpenEvent args)
{
TryComp<TemperatureComponent>(cryoPodComponent.BodyContainer.ContainedEntity, out var temp);
TryComp<BloodstreamComponent>(cryoPodComponent.BodyContainer.ContainedEntity, out var bloodstream);
_userInterfaceSystem.TrySendUiMessage(
uid,
HealthAnalyzerUiKey.Key,
new HealthAnalyzerScannedUserMessage(cryoPodComponent.BodyContainer.ContainedEntity));
new HealthAnalyzerScannedUserMessage(cryoPodComponent.BodyContainer.ContainedEntity,
temp != null ? temp.CurrentTemperature : 0, bloodstream != null ? bloodstream.BloodSolution.FillFraction : 0));
}
private void OnInteractUsing(EntityUid uid, CryoPodComponent cryoPodComponent, InteractUsingEvent args)