<PanelContainer Name="AlertsDivider" Visible="False" StyleClasses="LowDivider" />
- <BoxContainer Name="AlertsContainer" Visible="False" Margin="0 5" Orientation="Horizontal"
- HorizontalExpand="True" HorizontalAlignment="Center">
+ <BoxContainer Name="AlertsContainer" Visible="False" Margin="0 5" Orientation="Vertical" HorizontalAlignment="Center">
</BoxContainer>
// Alerts
- AlertsDivider.Visible = msg.Bleeding == true;
- AlertsContainer.Visible = msg.Bleeding == true;
+ var showAlerts = msg.Unrevivable == true || msg.Bleeding == true;
- if (msg.Bleeding == true)
- {
+ AlertsDivider.Visible = showAlerts;
+ AlertsContainer.Visible = showAlerts;
+
+ if (showAlerts)
AlertsContainer.DisposeAllChildren();
- AlertsContainer.AddChild(new Label
+
+ if (msg.Unrevivable == true)
+ AlertsContainer.AddChild(new RichTextLabel
+ {
+ Text = Loc.GetString("health-analyzer-window-entity-unrevivable-text"),
+ Margin = new Thickness(0, 4),
+ MaxWidth = 300
+ });
+
+ if (msg.Bleeding == true)
+ AlertsContainer.AddChild(new RichTextLabel
{
Text = Loc.GetString("health-analyzer-window-entity-bleeding-text"),
- FontColorOverride = Color.Red,
+ Margin = new Thickness(0, 4),
+ MaxWidth = 300
});
- }
// Damage Groups
? bloodSolution.FillFraction
: 0,
null,
+ null,
null
));
}
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;
var bloodAmount = float.NaN;
var bleeding = false;
+ var unrevivable = false;
if (TryComp<BloodstreamComponent>(target, out var bloodstream) &&
_solutionContainerSystem.ResolveSolution(target, bloodstream.BloodSolutionName,
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
));
}
}
public float BloodLevel;
public bool? ScanMode;
public bool? Bleeding;
+ public bool? Unrevivable;
- public HealthAnalyzerScannedUserMessage(NetEntity? targetEntity, float temperature, float bloodLevel, bool? scanMode, bool? bleeding)
+ public HealthAnalyzerScannedUserMessage(NetEntity? targetEntity, float temperature, float bloodLevel, bool? scanMode, bool? bleeding, bool? unrevivable)
{
TargetEntity = targetEntity;
Temperature = temperature;
BloodLevel = bloodLevel;
ScanMode = scanMode;
Bleeding = bleeding;
+ Unrevivable = unrevivable;
}
}
health-analyzer-window-damage-group-text = {$damageGroup}: {$amount}
health-analyzer-window-damage-type-text = {$damageType}: {$amount}
-health-analyzer-window-entity-bleeding-text = Patient is bleeding!
+health-analyzer-window-entity-unrevivable-text = [color=red]Unique body composition detected! Patient can not be resuscitated by normal means![/color]
+health-analyzer-window-entity-bleeding-text = [color=red]Patient is bleeding![/color]
health-analyzer-window-scan-mode-text = Scan Mode:
health-analyzer-window-scan-mode-active = Active