(eaf02c38d) If the character has no mentionable afflictions, automatically select the limb with highest dmg on it (if none selected) to be displayed in the health interface.

This commit is contained in:
Joonas Rikkonen
2019-04-15 12:10:33 +03:00
parent 3b38c7e69e
commit d3481c1dd6
3 changed files with 33 additions and 3 deletions
@@ -231,7 +231,8 @@ namespace Barotrauma
: afflictions.Concat(limbHealths.SelectMany(lh => lh.Afflictions.Where(limbHealthFilter)));
}
private LimbHealth GetMathingLimbHealth(Affliction affliction) => limbHealths[Character.AnimController.GetLimb(affliction.Prefab.IndicatorLimb).HealthIndex];
private LimbHealth GetMatchingLimbHealth(Limb limb) => limbHealths[limb.HealthIndex];
private LimbHealth GetMathingLimbHealth(Affliction affliction) => GetMatchingLimbHealth(Character.AnimController.GetLimb(affliction.Prefab.IndicatorLimb));
/// <summary>
/// Returns the limb afflictions and non-limbspecific afflictions that are set to be displayed on this limb.