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

@@ -35,7 +35,7 @@ namespace Content.Server.Body.Components
/// How much should bleeding should be reduced every update interval?
/// </summary>
[DataField]
public float BleedReductionAmount = 1.0f;
public float BleedReductionAmount = 0.33f;
/// <summary>
/// How high can <see cref="BleedAmount"/> go?

View File

@@ -203,6 +203,7 @@ public sealed partial class CryoPodSystem : SharedCryoPodSystem
bloodstream.BloodSolutionName, ref bloodstream.BloodSolution, out var bloodSolution))
? bloodSolution.FillFraction
: 0,
null,
null
));
}

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