diff --git a/Content.Server/Medical/PenLightSystem.cs b/Content.Server/Medical/PenLightSystem.cs index ed6deb40c19..ce0401a92ae 100644 --- a/Content.Server/Medical/PenLightSystem.cs +++ b/Content.Server/Medical/PenLightSystem.cs @@ -57,13 +57,14 @@ private void OnDoAfter(Entity uid, ref PenLightDoAfterEvent a args.Handled = true; } - /// - /// Checks if the PointLight component is enabled. - /// - private bool IsLightEnabled(EntityUid uid) - { - return TryComp(uid, out var pointLight) && pointLight.Enabled; - } + /// + /// Checks if the PointLight component is enabled. + /// + private bool IsLightEnabled(EntityUid uid) + { + return TryComp(uid, out var pointLight) && pointLight.Enabled; + } + /// /// Actually handles the exam interaction. /// @@ -78,7 +79,12 @@ public bool TryStartExam(EntityUid uid, EntityUid target, EntityUid user, PenLig _popup.PopupEntity(Loc.GetString("penlight-off"), uid, user); return false; } - + // can't examine your own eyes, dingus + if (user == target) + { + _popup.PopupEntity(Loc.GetString("penlight-cannot-examine-self"), uid, user); + return false; + } return _doAfter.TryStartDoAfter(new DoAfterArgs(EntityManager, user, component.ExamSpeed, new PenLightDoAfterEvent(), uid, target, uid) { diff --git a/Resources/Locale/en-US/medical/components/penlight.ftl b/Resources/Locale/en-US/medical/components/penlight.ftl index 103c4a29478..c8a5d66f5d5 100644 --- a/Resources/Locale/en-US/medical/components/penlight.ftl +++ b/Resources/Locale/en-US/medical/components/penlight.ftl @@ -1,4 +1,5 @@ penlight-off = The pen light is off. +penlight-cannot-examine-self = You cannot examine your own eyes. pen-light-exam-title = Pen Light pen-light-window-entity-eyes-text = {$entityName}'s conditions: pen-light-window-no-patient-data-text = No patient data.