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

@@ -6,6 +6,8 @@ using Content.Shared.Interaction;
using Content.Shared.MedicalScanner;
using Content.Shared.Mobs.Components;
using Robust.Server.GameObjects;
using Content.Server.Temperature.Components;
using Content.Server.Body.Components;
namespace Content.Server.Medical
{
@@ -68,8 +70,13 @@ namespace Content.Server.Medical
if (!HasComp<DamageableComponent>(target))
return;
TryComp<TemperatureComponent>(target, out var temp);
TryComp<BloodstreamComponent>(target, out var bloodstream);
OpenUserInterface(user, healthAnalyzer);
_uiSystem.SendUiMessage(healthAnalyzer.UserInterface, new HealthAnalyzerScannedUserMessage(target));
_uiSystem.SendUiMessage(healthAnalyzer.UserInterface, new HealthAnalyzerScannedUserMessage(target, temp != null ? temp.CurrentTemperature : float.NaN,
bloodstream != null ? bloodstream.BloodSolution.FillFraction : float.NaN));
}
}
}