Add health analyzer unrevivability warning (#32636)
* Add health analyzer unrevivability warning * Remove errornous comment
This commit is contained in:
@@ -2,6 +2,7 @@ using Content.Server.Body.Components;
|
||||
using Content.Server.Medical.Components;
|
||||
using Content.Server.PowerCell;
|
||||
using Content.Server.Temperature.Components;
|
||||
using Content.Server.Traits.Assorted;
|
||||
using Content.Shared.Chemistry.EntitySystems;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.DoAfter;
|
||||
@@ -196,6 +197,7 @@ public sealed class HealthAnalyzerSystem : EntitySystem
|
||||
|
||||
var bloodAmount = float.NaN;
|
||||
var bleeding = false;
|
||||
var unrevivable = false;
|
||||
|
||||
if (TryComp<BloodstreamComponent>(target, out var bloodstream) &&
|
||||
_solutionContainerSystem.ResolveSolution(target, bloodstream.BloodSolutionName,
|
||||
@@ -205,12 +207,16 @@ public sealed class HealthAnalyzerSystem : EntitySystem
|
||||
bleeding = bloodstream.BleedAmount > 0;
|
||||
}
|
||||
|
||||
if (HasComp<UnrevivableComponent>(target))
|
||||
unrevivable = true;
|
||||
|
||||
_uiSystem.ServerSendUiMessage(healthAnalyzer, HealthAnalyzerUiKey.Key, new HealthAnalyzerScannedUserMessage(
|
||||
GetNetEntity(target),
|
||||
bodyTemperature,
|
||||
bloodAmount,
|
||||
scanMode,
|
||||
bleeding
|
||||
bleeding,
|
||||
unrevivable
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user