Whisper bleed update v3 (#25434)

* Whisper bleed update v3

* missed a few

* Add bleeding message to health analyzer.

* Fix bleed notification not updating.

* Apparently this either doesnt exist
This commit is contained in:
Whisper
2024-02-26 18:26:46 -05:00
committed by GitHub
parent 88ae71715b
commit ff65cb7b0c
11 changed files with 33 additions and 7 deletions

View File

@@ -179,16 +179,24 @@ public sealed class HealthAnalyzerSystem : EntitySystem
bodyTemperature = temp.CurrentTemperature;
var bloodAmount = float.NaN;
var bleeding = false;
if (TryComp<BloodstreamComponent>(target, out var bloodstream) &&
_solutionContainerSystem.ResolveSolution(target, bloodstream.BloodSolutionName, ref bloodstream.BloodSolution, out var bloodSolution))
_solutionContainerSystem.ResolveSolution(target, bloodstream.BloodSolutionName,
ref bloodstream.BloodSolution, out var bloodSolution))
{
bloodAmount = bloodSolution.FillFraction;
bleeding = bloodstream.BleedAmount > 0;
}
_uiSystem.SendUiMessage(ui, new HealthAnalyzerScannedUserMessage(
GetNetEntity(target),
bodyTemperature,
bloodAmount,
scanMode
scanMode,
bleeding
));
}
}