diff --git a/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs b/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs index 9e786ce436..588eb88502 100644 --- a/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs +++ b/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs @@ -5,6 +5,7 @@ using Content.Shared.Damage.Prototypes; using Content.Shared.FixedPoint; using Content.Shared.IdentityManagement; using Content.Shared.MedicalScanner; +using Content.Shared.Nutrition.Components; using Robust.Client.AutoGenerated; using Robust.Client.UserInterface.CustomControls; using Robust.Client.UserInterface.XAML; @@ -12,6 +13,7 @@ using Robust.Client.GameObjects; using Robust.Client.Graphics; using Robust.Client.UserInterface.Controls; using Robust.Client.ResourceManagement; +using Robust.Client.UserInterface; using Robust.Shared.Prototypes; using Robust.Shared.Utility; @@ -85,6 +87,19 @@ namespace Content.Client.HealthAnalyzer.UI DrawDiagnosticGroups(damageSortedGroups, damagePerType); + if (_entityManager.TryGetComponent(target, out HungerComponent? hunger) + && hunger.StarvationDamage != null + && hunger.CurrentThreshold <= HungerThreshold.Starving) + { + var box = new Control { Margin = new Thickness(0, 0, 0, 15) }; + + box.AddChild(CreateDiagnosticGroupTitle( + Loc.GetString("health-analyzer-window-malnutrition"), + "malnutrition")); + + GroupsContainer.AddChild(box); + } + SetHeight = AnalyzerHeight; SetWidth = AnalyzerWidth; } @@ -113,7 +128,7 @@ namespace Content.Client.HealthAnalyzer.UI Orientation = BoxContainer.LayoutOrientation.Vertical, }; - groupContainer.AddChild(CreateDiagnosticGroupTitle(groupTitleText, damageGroupId, damageAmount.Int())); + groupContainer.AddChild(CreateDiagnosticGroupTitle(groupTitleText, damageGroupId)); GroupsContainer.AddChild(groupContainer); @@ -166,7 +181,7 @@ namespace Content.Client.HealthAnalyzer.UI }; } - private BoxContainer CreateDiagnosticGroupTitle(string text, string id, int damageAmount) + private BoxContainer CreateDiagnosticGroupTitle(string text, string id) { var rootContainer = new BoxContainer { diff --git a/Resources/Locale/en-US/medical/components/health-analyzer-component.ftl b/Resources/Locale/en-US/medical/components/health-analyzer-component.ftl index 453bbdbb52..d232be5c4d 100644 --- a/Resources/Locale/en-US/medical/components/health-analyzer-component.ftl +++ b/Resources/Locale/en-US/medical/components/health-analyzer-component.ftl @@ -29,3 +29,5 @@ health-analyzer-window-damage-type-Radiation = Radiation health-analyzer-window-damage-group-Genetic = Genetic health-analyzer-window-damage-type-Cellular = Cellular + +health-analyzer-window-malnutrition = Severely malnourished diff --git a/Resources/Textures/Objects/Devices/health_analyzer.rsi/malnutrition.png b/Resources/Textures/Objects/Devices/health_analyzer.rsi/malnutrition.png new file mode 100644 index 0000000000..edcfb6119b Binary files /dev/null and b/Resources/Textures/Objects/Devices/health_analyzer.rsi/malnutrition.png differ diff --git a/Resources/Textures/Objects/Devices/health_analyzer.rsi/meta.json b/Resources/Textures/Objects/Devices/health_analyzer.rsi/meta.json index 3fccf5c46b..bbf78c0b88 100644 --- a/Resources/Textures/Objects/Devices/health_analyzer.rsi/meta.json +++ b/Resources/Textures/Objects/Devices/health_analyzer.rsi/meta.json @@ -5,7 +5,7 @@ "y": 32 }, "license": "CC-BY-SA-3.0", - "copyright": "airloss, brute, toxin and burn edited from /tg/station https://github.com/tgstation/tgstation/tree/master genetic edited from https://iconscout.com/free-icon/dna-2130814 with license CC BY 4.0", + "copyright": "airloss, brute, toxin and burn edited from /tg/station https://github.com/tgstation/tgstation/tree/master genetic edited from https://iconscout.com/free-icon/dna-2130814 with license CC BY 4.0. malnutrition from https://github.com/space-wizards/space-station-14/tree/73d7837fabb31a7691a1db47ff64903cbec5dd32/Resources/Textures/Interface/Alerts/hunger.rsi", "states": [ { "name": "airloss" @@ -24,6 +24,9 @@ }, { "name": "unknown" + }, + { + "name": "malnutrition" } ] -} \ No newline at end of file +}