<Label
Name="BloodLevel"
Margin="0 5 0 0"/>
+ <Label
+ Name="Bleeding"
+ Margin="0 5 0 0"/>
<Label
Name="patientDamageAmount"
Margin="0 15 0 0"/>
("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)
/// 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?
bloodstream.BloodSolutionName, ref bloodstream.BloodSolution, out var bloodSolution))
? bloodSolution.FillFraction
: 0,
+ null,
null
));
}
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
));
}
}
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;
}
}
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}
bloodlossDamage:
types:
Bloodloss:
- 1
+ 0.5
bloodlossHealDamage:
types:
Bloodloss:
bloodlossDamage:
types:
Bloodloss:
- 1
+ 0.5
bloodlossHealDamage:
types:
Bloodloss:
- type: Bloodstream
bloodlossDamage:
types:
- Bloodloss: 1
+ Bloodloss: 0.5
bloodlossHealDamage:
types:
Bloodloss: -1
components:
- type: Stack
lingering: true
+
- type: entity
parent: BaseHealingItem
id: Tourniquet