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:
@@ -32,6 +32,9 @@
|
||||
<Label
|
||||
Name="BloodLevel"
|
||||
Margin="0 5 0 0"/>
|
||||
<Label
|
||||
Name="Bleeding"
|
||||
Margin="0 5 0 0"/>
|
||||
<Label
|
||||
Name="patientDamageAmount"
|
||||
Margin="0 15 0 0"/>
|
||||
|
||||
@@ -86,6 +86,16 @@ namespace Content.Client.HealthAnalyzer.UI
|
||||
("bloodLevel", float.IsNaN(msg.BloodLevel) ? "N/A" : $"{msg.BloodLevel * 100:F1} %")
|
||||
);
|
||||
|
||||
if (msg.Bleeding == true)
|
||||
{
|
||||
Bleeding.Text = Loc.GetString("health-analyzer-window-entity-bleeding-text");
|
||||
Bleeding.FontColorOverride = Color.Red;
|
||||
}
|
||||
else
|
||||
{
|
||||
Bleeding.Text = string.Empty; // Clear the text
|
||||
}
|
||||
|
||||
patientDamageAmount.Text = Loc.GetString(
|
||||
"health-analyzer-window-entity-damage-total-text",
|
||||
("amount", damageable.TotalDamage)
|
||||
|
||||
@@ -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?
|
||||
|
||||
@@ -203,6 +203,7 @@ public sealed partial class CryoPodSystem : SharedCryoPodSystem
|
||||
bloodstream.BloodSolutionName, ref bloodstream.BloodSolution, out var bloodSolution))
|
||||
? bloodSolution.FillFraction
|
||||
: 0,
|
||||
null,
|
||||
null
|
||||
));
|
||||
}
|
||||
|
||||
@@ -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
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,13 +12,15 @@ public sealed class HealthAnalyzerScannedUserMessage : BoundUserInterfaceMessage
|
||||
public float Temperature;
|
||||
public float BloodLevel;
|
||||
public bool? ScanMode;
|
||||
public bool? Bleeding;
|
||||
|
||||
public HealthAnalyzerScannedUserMessage(NetEntity? targetEntity, float temperature, float bloodLevel, bool? scanMode)
|
||||
public HealthAnalyzerScannedUserMessage(NetEntity? targetEntity, float temperature, float bloodLevel, bool? scanMode, bool? bleeding)
|
||||
{
|
||||
TargetEntity = targetEntity;
|
||||
Temperature = temperature;
|
||||
BloodLevel = bloodLevel;
|
||||
ScanMode = scanMode;
|
||||
Bleeding = bleeding;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ health-analyzer-window-entity-unknown-text = unknown
|
||||
health-analyzer-window-entity-health-text = {$entityName}'s health:
|
||||
health-analyzer-window-entity-temperature-text = Temperature: {$temperature}
|
||||
health-analyzer-window-entity-blood-level-text = Blood Level: {$bloodLevel}
|
||||
health-analyzer-window-entity-bleeding-text = Patient is bleeding!
|
||||
health-analyzer-window-entity-damage-total-text = Total Damage: {$amount}
|
||||
health-analyzer-window-damage-group-text = {$damageGroup}: {$amount}
|
||||
health-analyzer-window-damage-type-text = {$damageType}: {$amount}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
bloodlossDamage:
|
||||
types:
|
||||
Bloodloss:
|
||||
1
|
||||
0.5
|
||||
bloodlossHealDamage:
|
||||
types:
|
||||
Bloodloss:
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
bloodlossDamage:
|
||||
types:
|
||||
Bloodloss:
|
||||
1
|
||||
0.5
|
||||
bloodlossHealDamage:
|
||||
types:
|
||||
Bloodloss:
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
- type: Bloodstream
|
||||
bloodlossDamage:
|
||||
types:
|
||||
Bloodloss: 1
|
||||
Bloodloss: 0.5
|
||||
bloodlossHealDamage:
|
||||
types:
|
||||
Bloodloss: -1
|
||||
|
||||
@@ -229,6 +229,7 @@
|
||||
components:
|
||||
- type: Stack
|
||||
lingering: true
|
||||
|
||||
- type: entity
|
||||
parent: BaseHealingItem
|
||||
id: Tourniquet
|
||||
|
||||
Reference in New Issue
Block a user