Suit Sensors No Longer Use a Hardcoded 'Total Health' (#26658)

* Suit sensors now know the 'total health' of an entity

* Missed the constructor 😔
This commit is contained in:
Pspritechologist
2024-04-04 04:38:27 -04:00
committed by GitHub
parent d9c1130d8c
commit f5d9d3c458
3 changed files with 17 additions and 2 deletions

View File

@@ -210,9 +210,9 @@ public sealed partial class CrewMonitoringWindow : FancyWindow
specifier = new SpriteSpecifier.Rsi(new ResPath("Interface/Alerts/human_crew_monitoring.rsi"), "dead");
}
else if (sensor.TotalDamage != null)
else if (sensor.DamagePercentage != null)
{
var index = MathF.Round(4f * (sensor.TotalDamage.Value / 100f));
var index = MathF.Round(4f * sensor.DamagePercentage.Value);
if (index >= 5)
specifier = new SpriteSpecifier.Rsi(new ResPath("Interface/Alerts/human_crew_monitoring.rsi"), "critical");