Skip to content

Commit

Permalink
can't examine your own eyes
Browse files Browse the repository at this point in the history
  • Loading branch information
SleepyScarecrow committed Sep 10, 2024
1 parent 24fd446 commit d1296e7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
22 changes: 14 additions & 8 deletions Content.Server/Medical/PenLightSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,14 @@ private void OnDoAfter(Entity<PenLightComponent> uid, ref PenLightDoAfterEvent a
args.Handled = true;
}

/// <summary>
/// Checks if the PointLight component is enabled.
/// </summary>
private bool IsLightEnabled(EntityUid uid)
{
return TryComp<PointLightComponent>(uid, out var pointLight) && pointLight.Enabled;
}
/// <summary>
/// Checks if the PointLight component is enabled.
/// </summary>
private bool IsLightEnabled(EntityUid uid)
{
return TryComp<PointLightComponent>(uid, out var pointLight) && pointLight.Enabled;
}

/// <summary>
/// Actually handles the exam interaction.
/// </summary>
Expand All @@ -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)
{
Expand Down
1 change: 1 addition & 0 deletions Resources/Locale/en-US/medical/components/penlight.ftl
Original file line number Diff line number Diff line change
@@ -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.
Expand Down

0 comments on commit d1296e7

Please sign in to comment.