resimmed offmed
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
using Content.Shared.MedicalScanner;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
using Robust.Client.UserInterface;
|
||||
|
||||
namespace Content.Client.HealthAnalyzer.UI.Tooltips;
|
||||
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class BloodFlowTooltip : PanelContainer
|
||||
{
|
||||
public BloodFlowTooltip()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
}
|
||||
|
||||
public void Update(HealthAnalyzerScannedUserMessage msg)
|
||||
{
|
||||
if (msg.WoundableData is not { } woundable)
|
||||
return;
|
||||
|
||||
Label.Text = Loc.GetString("health-analyzer-blood-flow-tooltip", ("heartrate", woundable.HeartRate), ("health", $"{woundable.HeartHealth * 100:F1}"));
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
<PanelContainer xmlns="https://spacestation14.io" StyleClasses="tooltipBox" MaxWidth="450">
|
||||
<BoxContainer
|
||||
Orientation="Vertical"
|
||||
RectClipContent="True"
|
||||
Margin="4">
|
||||
<RichTextLabel Name="Label" HorizontalExpand="True" />
|
||||
</BoxContainer>
|
||||
</PanelContainer>
|
||||
@@ -1,34 +0,0 @@
|
||||
using Content.Shared._Offbrand.Wounds;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.MedicalScanner;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
using Robust.Client.UserInterface;
|
||||
|
||||
namespace Content.Client.HealthAnalyzer.UI.Tooltips;
|
||||
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class BloodOxygenationTooltip : PanelContainer
|
||||
{
|
||||
public BloodOxygenationTooltip()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
}
|
||||
|
||||
public void Update(HealthAnalyzerScannedUserMessage msg, Entity<DamageableComponent, HeartrateComponent?> ent)
|
||||
{
|
||||
if (msg.WoundableData is not { } woundable)
|
||||
return;
|
||||
|
||||
if (ent.Comp2?.AsphyxiationDamage is not { } damageType)
|
||||
return;
|
||||
|
||||
var asphyxiation = FixedPoint2.Zero;
|
||||
ent.Comp1.Damage.DamageDict.TryGetValue(damageType, out asphyxiation);
|
||||
var (systolic, diastolic) = woundable.BloodPressure;
|
||||
|
||||
Label.Text = Loc.GetString("health-analyzer-blood-saturation-tooltip", ("rating", woundable.BloodOxygenationRating), ("systolic", systolic), ("diastolic", diastolic), ("asphyxiation", asphyxiation));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace Content.Client.HealthAnalyzer.UI.Tooltips;
|
||||
|
||||
public sealed partial class BloodPressureTooltip : StaticTooltip
|
||||
{
|
||||
public override LocId Text => "health-analyzer-blood-pressure-tooltip";
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
<PanelContainer xmlns="https://spacestation14.io" StyleClasses="tooltipBox" MaxWidth="450">
|
||||
<BoxContainer
|
||||
Orientation="Vertical"
|
||||
RectClipContent="True"
|
||||
Margin="4">
|
||||
<RichTextLabel Name="Label" HorizontalExpand="True" />
|
||||
</BoxContainer>
|
||||
</PanelContainer>
|
||||
@@ -1,24 +0,0 @@
|
||||
using Content.Shared.MedicalScanner;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
using Robust.Client.UserInterface;
|
||||
|
||||
namespace Content.Client.HealthAnalyzer.UI.Tooltips;
|
||||
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class BloodPressureTooltip : PanelContainer
|
||||
{
|
||||
public BloodPressureTooltip()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
}
|
||||
|
||||
public void Update(HealthAnalyzerScannedUserMessage msg)
|
||||
{
|
||||
if (msg.WoundableData is not { } woundable)
|
||||
return;
|
||||
|
||||
Label.Text = Loc.GetString("health-analyzer-blood-pressure-tooltip", ("flow", $"{woundable.BloodFlow * 100:F1}"));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace Content.Client.HealthAnalyzer.UI.Tooltips;
|
||||
|
||||
public sealed partial class BloodTooltip : StaticTooltip
|
||||
{
|
||||
public override LocId Text => "health-analyzer-blood-tooltip";
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
<PanelContainer xmlns="https://spacestation14.io" StyleClasses="tooltipBox">
|
||||
<BoxContainer
|
||||
Orientation="Vertical"
|
||||
RectClipContent="True"
|
||||
Margin="4">
|
||||
<RichTextLabel Text="{Loc 'health-analyzer-blood-tooltip'}" HorizontalExpand="True" />
|
||||
</BoxContainer>
|
||||
</PanelContainer>
|
||||
@@ -1,15 +0,0 @@
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
using Robust.Client.UserInterface;
|
||||
|
||||
namespace Content.Client.HealthAnalyzer.UI.Tooltips;
|
||||
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class BloodTooltip : PanelContainer
|
||||
{
|
||||
public BloodTooltip()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using Content.Shared.MedicalScanner;
|
||||
|
||||
namespace Content.Client.HealthAnalyzer.UI.Tooltips;
|
||||
|
||||
public sealed partial class BrainHealthTooltip : UpdatableTooltip
|
||||
{
|
||||
public override void Update(HealthAnalyzerScannedUserMessage msg)
|
||||
{
|
||||
if (msg.WoundableData is not { } woundable)
|
||||
return;
|
||||
|
||||
Label.Text = Loc.GetString("health-analyzer-brain-health-tooltip", ("dead", woundable.BrainHealth <= 0), ("spo2", $"{woundable.Spo2 * 100:F1}"));
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
<PanelContainer xmlns="https://spacestation14.io" StyleClasses="tooltipBox" MaxWidth="450">
|
||||
<BoxContainer
|
||||
Orientation="Vertical"
|
||||
RectClipContent="True"
|
||||
Margin="4">
|
||||
<RichTextLabel Name="Label" HorizontalExpand="True" />
|
||||
</BoxContainer>
|
||||
</PanelContainer>
|
||||
@@ -1,24 +0,0 @@
|
||||
using Content.Shared.MedicalScanner;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
using Robust.Client.UserInterface;
|
||||
|
||||
namespace Content.Client.HealthAnalyzer.UI.Tooltips;
|
||||
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class BrainHealthTooltip : PanelContainer
|
||||
{
|
||||
public BrainHealthTooltip()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
}
|
||||
|
||||
public void Update(HealthAnalyzerScannedUserMessage msg)
|
||||
{
|
||||
if (msg.WoundableData is not { } woundable)
|
||||
return;
|
||||
|
||||
Label.Text = Loc.GetString("health-analyzer-brain-health-tooltip", ("dead", woundable.BrainHealth <= 0), ("rating", woundable.BrainHealthRating), ("saturation", $"{woundable.BloodOxygenation * 100:F1}"));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace Content.Client.HealthAnalyzer.UI.Tooltips;
|
||||
|
||||
public sealed partial class DamageTooltip : StaticTooltip
|
||||
{
|
||||
public override LocId Text => "health-analyzer-damage-tooltip";
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
<PanelContainer xmlns="https://spacestation14.io" StyleClasses="tooltipBox">
|
||||
<BoxContainer
|
||||
Orientation="Vertical"
|
||||
RectClipContent="True"
|
||||
Margin="4">
|
||||
<RichTextLabel Text="{Loc 'health-analyzer-damage-tooltip'}" HorizontalExpand="True" />
|
||||
</BoxContainer>
|
||||
</PanelContainer>
|
||||
@@ -1,15 +0,0 @@
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
using Robust.Client.UserInterface;
|
||||
|
||||
namespace Content.Client.HealthAnalyzer.UI.Tooltips;
|
||||
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class DamageTooltip : PanelContainer
|
||||
{
|
||||
public DamageTooltip()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
}
|
||||
}
|
||||
14
Content.Client/HealthAnalyzer/UI/Tooltips/EtCO2Tooltip.cs
Normal file
14
Content.Client/HealthAnalyzer/UI/Tooltips/EtCO2Tooltip.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using Content.Shared.MedicalScanner;
|
||||
|
||||
namespace Content.Client.HealthAnalyzer.UI.Tooltips;
|
||||
|
||||
public sealed partial class EtCO2Tooltip : UpdatableTooltip
|
||||
{
|
||||
public override void Update(HealthAnalyzerScannedUserMessage msg)
|
||||
{
|
||||
if (msg.WoundableData is not { } woundable)
|
||||
return;
|
||||
|
||||
Label.Text = Loc.GetString("health-analyzer-etco2-tooltip", ("gas", woundable.Etco2GasName), ("etco2", woundable.Etco2Name));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using Content.Shared.MedicalScanner;
|
||||
|
||||
namespace Content.Client.HealthAnalyzer.UI.Tooltips;
|
||||
|
||||
public sealed partial class HeartHealthTooltip : UpdatableTooltip
|
||||
{
|
||||
public override void Update(HealthAnalyzerScannedUserMessage msg)
|
||||
{
|
||||
if (msg.WoundableData is not { } woundable)
|
||||
return;
|
||||
|
||||
Label.Text = Loc.GetString("health-analyzer-heart-health-tooltip", ("heartrate", woundable.HeartRate));
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
using Content.Shared.MedicalScanner;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
using Robust.Client.UserInterface;
|
||||
|
||||
namespace Content.Client.HealthAnalyzer.UI.Tooltips;
|
||||
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class HeartHealthTooltip : PanelContainer
|
||||
{
|
||||
public HeartHealthTooltip()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
}
|
||||
|
||||
public void Update(HealthAnalyzerScannedUserMessage msg)
|
||||
{
|
||||
if (msg.WoundableData is not { } woundable)
|
||||
return;
|
||||
|
||||
Label.Text = Loc.GetString("health-analyzer-heart-health-tooltip", ("heartrate", woundable.HeartRate));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using Content.Shared.MedicalScanner;
|
||||
|
||||
namespace Content.Client.HealthAnalyzer.UI.Tooltips;
|
||||
|
||||
public sealed partial class HeartRateTooltip : UpdatableTooltip
|
||||
{
|
||||
public override void Update(HealthAnalyzerScannedUserMessage msg)
|
||||
{
|
||||
if (msg.WoundableData is not { } woundable)
|
||||
return;
|
||||
|
||||
Label.Text = Loc.GetString("health-analyzer-heart-rate-tooltip", ("spo2", woundable.Spo2Name));
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
<PanelContainer xmlns="https://spacestation14.io" StyleClasses="tooltipBox" MaxWidth="450">
|
||||
<BoxContainer
|
||||
Orientation="Vertical"
|
||||
RectClipContent="True"
|
||||
Margin="4">
|
||||
<RichTextLabel Name="Label" HorizontalExpand="True" />
|
||||
</BoxContainer>
|
||||
</PanelContainer>
|
||||
@@ -1,33 +0,0 @@
|
||||
using Content.Shared._Offbrand.Wounds;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.MedicalScanner;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
using Robust.Client.UserInterface;
|
||||
|
||||
namespace Content.Client.HealthAnalyzer.UI.Tooltips;
|
||||
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class HeartRateTooltip : PanelContainer
|
||||
{
|
||||
public HeartRateTooltip()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
}
|
||||
|
||||
public void Update(HealthAnalyzerScannedUserMessage msg, Entity<DamageableComponent, HeartrateComponent?> ent)
|
||||
{
|
||||
if (msg.WoundableData is not { } woundable)
|
||||
return;
|
||||
|
||||
if (ent.Comp2?.AsphyxiationDamage is not { } damageType)
|
||||
return;
|
||||
|
||||
var asphyxiation = FixedPoint2.Zero;
|
||||
ent.Comp1.Damage.DamageDict.TryGetValue(damageType, out asphyxiation);
|
||||
|
||||
Label.Text = Loc.GetString("health-analyzer-heart-rate-tooltip", ("asphyxiation", asphyxiation));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace Content.Client.HealthAnalyzer.UI.Tooltips;
|
||||
|
||||
public sealed partial class LungHealthTooltip : StaticTooltip
|
||||
{
|
||||
public override LocId Text => "health-analyzer-lung-health-tooltip";
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
<PanelContainer xmlns="https://spacestation14.io" StyleClasses="tooltipBox">
|
||||
<BoxContainer
|
||||
Orientation="Vertical"
|
||||
RectClipContent="True"
|
||||
Margin="4">
|
||||
<RichTextLabel Text="{Loc 'health-analyzer-lung-health-tooltip'}" HorizontalExpand="True" />
|
||||
</BoxContainer>
|
||||
</PanelContainer>
|
||||
@@ -0,0 +1,14 @@
|
||||
using Content.Shared.MedicalScanner;
|
||||
|
||||
namespace Content.Client.HealthAnalyzer.UI.Tooltips;
|
||||
|
||||
public sealed partial class RespiratoryRateTooltip : UpdatableTooltip
|
||||
{
|
||||
public override void Update(HealthAnalyzerScannedUserMessage msg)
|
||||
{
|
||||
if (msg.WoundableData is not { } woundable)
|
||||
return;
|
||||
|
||||
Label.Text = Loc.GetString("health-analyzer-respiratory-rate-tooltip", ("etco2gas", woundable.Etco2GasName), ("etco2", woundable.Etco2Name), ("spo2gas", woundable.Spo2GasName), ("spo2", woundable.Spo2Name));
|
||||
}
|
||||
}
|
||||
14
Content.Client/HealthAnalyzer/UI/Tooltips/SpO2Tooltip.cs
Normal file
14
Content.Client/HealthAnalyzer/UI/Tooltips/SpO2Tooltip.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using Content.Shared.MedicalScanner;
|
||||
|
||||
namespace Content.Client.HealthAnalyzer.UI.Tooltips;
|
||||
|
||||
public sealed partial class SpO2Tooltip : UpdatableTooltip
|
||||
{
|
||||
public override void Update(HealthAnalyzerScannedUserMessage msg)
|
||||
{
|
||||
if (msg.WoundableData is not { } woundable)
|
||||
return;
|
||||
|
||||
Label.Text = Loc.GetString("health-analyzer-spo2-tooltip", ("gas", woundable.Spo2GasName), ("spo2", woundable.Spo2Name));
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
using Content.Shared.MedicalScanner;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
@@ -6,10 +7,14 @@ using Robust.Client.UserInterface;
|
||||
namespace Content.Client.HealthAnalyzer.UI.Tooltips;
|
||||
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class LungHealthTooltip : PanelContainer
|
||||
[Virtual]
|
||||
public partial class StaticTooltip : PanelContainer
|
||||
{
|
||||
public LungHealthTooltip()
|
||||
public StaticTooltip()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
Label.Text = Loc.GetString(Text);
|
||||
}
|
||||
|
||||
public virtual LocId Text => throw new NotImplementedException();
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace Content.Client.HealthAnalyzer.UI.Tooltips;
|
||||
|
||||
public sealed partial class StatusTooltip : StaticTooltip
|
||||
{
|
||||
public override LocId Text => "health-analyzer-status-tooltip";
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
<PanelContainer xmlns="https://spacestation14.io" StyleClasses="tooltipBox">
|
||||
<BoxContainer
|
||||
Orientation="Vertical"
|
||||
RectClipContent="True"
|
||||
Margin="4">
|
||||
<RichTextLabel Text="{Loc 'health-analyzer-status-tooltip'}" HorizontalExpand="True" />
|
||||
</BoxContainer>
|
||||
</PanelContainer>
|
||||
@@ -3,6 +3,6 @@
|
||||
Orientation="Vertical"
|
||||
RectClipContent="True"
|
||||
Margin="4">
|
||||
<RichTextLabel Name="Label" HorizontalExpand="True" />
|
||||
<RichTextLabel Access="Protected" Name="Label" HorizontalExpand="True" />
|
||||
</BoxContainer>
|
||||
</PanelContainer>
|
||||
@@ -1,3 +1,4 @@
|
||||
using Content.Shared.MedicalScanner;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
@@ -6,10 +7,15 @@ using Robust.Client.UserInterface;
|
||||
namespace Content.Client.HealthAnalyzer.UI.Tooltips;
|
||||
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class StatusTooltip : PanelContainer
|
||||
[Virtual]
|
||||
public partial class UpdatableTooltip : PanelContainer
|
||||
{
|
||||
public StatusTooltip()
|
||||
public UpdatableTooltip()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
}
|
||||
|
||||
public virtual void Update(HealthAnalyzerScannedUserMessage msg)
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user