Eye damage (#10262)

This commit is contained in:
Rane
2022-08-14 01:59:14 -04:00
committed by GitHub
parent ef924faae7
commit 572a4f7fb3
39 changed files with 653 additions and 20 deletions

View File

@@ -101,6 +101,12 @@ namespace Content.Shared.Examine
return DeadExamineRange;
else if (MobStateSystem.IsCritical(examiner, mobState) || (TryComp<BlindableComponent>(examiner, out var blind) && blind.Sources > 0))
return CritExamineRange;
else if (TryComp<BlurryVisionComponent>(examiner, out var blurry) && blurry.Magnitude != 0)
{
float range = ExamineRange - (2 * (8 - blurry.Magnitude));
return Math.Clamp(range, 2, 16);
}
}
return ExamineRange;
}