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;
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;
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;
}
Orientation = BoxContainer.LayoutOrientation.Vertical,
};
- groupContainer.AddChild(CreateDiagnosticGroupTitle(groupTitleText, damageGroupId, damageAmount.Int()));
+ groupContainer.AddChild(CreateDiagnosticGroupTitle(groupTitleText, damageGroupId));
GroupsContainer.AddChild(groupContainer);
};
}
- private BoxContainer CreateDiagnosticGroupTitle(string text, string id, int damageAmount)
+ private BoxContainer CreateDiagnosticGroupTitle(string text, string id)
{
var rootContainer = new BoxContainer
{
"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"
},
{
"name": "unknown"
+ },
+ {
+ "name": "malnutrition"
}
]
-}
\ No newline at end of file
+}