Faction Test v1.0.1.0
This commit is contained in:
@@ -302,7 +302,18 @@ namespace Barotrauma.Items.Components
|
||||
Dictionary<AfflictionPrefab, float> combinedAfflictionStrengths = new Dictionary<AfflictionPrefab, float>();
|
||||
foreach (Affliction affliction in allAfflictions)
|
||||
{
|
||||
if (affliction.Strength < affliction.Prefab.ShowInHealthScannerThreshold || affliction.Strength <= 0.0f) { continue; }
|
||||
if (affliction.Strength <= 0f) { continue; }
|
||||
if (affliction.Strength < affliction.Prefab.ShowInHealthScannerThreshold)
|
||||
{
|
||||
if (target.IsHuman || target.IsOnPlayerTeam || (affliction.Prefab.AfflictionType != AfflictionPrefab.PoisonType && affliction.Prefab.AfflictionType != AfflictionPrefab.ParalysisType))
|
||||
{
|
||||
// Always show the poisons on monsters, because poisoning bigger monsters require multiple doses.
|
||||
// The solution is hacky, but didn't want to introduce an extra property for this.
|
||||
// We also want to have a relatively high thershold for showing the poisons on the scanner on humans, so that it's not instantly clear that a target is poisoned and especially not which poison was used.
|
||||
// Paralysis is treated like a poison but isn't technically a poison, so that we can have multiple afflictions that still are treated the same.
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (combinedAfflictionStrengths.ContainsKey(affliction.Prefab))
|
||||
{
|
||||
combinedAfflictionStrengths[affliction.Prefab] += affliction.Strength;
|
||||
|
||||
Reference in New Issue
Block a user