Blindness rework - damaged eyes are now a stylized simulation of legal blindness (#23212)

* blindness rework - damaged eyes now simulate legal blindness

* hEY THATS FOR DEMONSTRATION PURPOSES ONLY AAA

* attributions

* makes eyeclosecomponent adminbus compatible

* useshader(null)
This commit is contained in:
deathride58
2024-01-03 04:07:02 -05:00
committed by GitHub
parent 1a531342c5
commit aa6645c8e9
28 changed files with 508 additions and 89 deletions

View File

@@ -38,6 +38,8 @@ namespace Content.Shared.Examine
public const float ExamineRange = 16f;
protected const float ExamineDetailsRange = 3f;
protected const float ExamineBlurrinessMult = 2.5f;
/// <summary>
/// Creates a new examine tooltip with arbitrary info.
/// </summary>
@@ -125,7 +127,7 @@ namespace Content.Shared.Examine
return CritExamineRange;
if (TryComp<BlurryVisionComponent>(examiner, out var blurry))
return Math.Clamp(ExamineRange - blurry.Magnitude, 2, ExamineRange);
return Math.Clamp(ExamineRange - blurry.Magnitude * ExamineBlurrinessMult, 2, ExamineRange);
}
return ExamineRange;
}