mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-21 15:38:52 +03:00
# Description Added in penlights that spawn in Medical Staff PDAs. --- # TODO - [x] EyeCheck system - [x] Add in the bloody pens. --- <details><summary><h1>Media</h1></summary> <p> https://github.com/user-attachments/assets/dc746aa2-782e-4d86-b9ef-9e012343fb87 </p> </details> --- # Changelog 🆑 Tilkku - add: Added Pen Lights - add: Eye Examination --------- Signed-off-by: SleepyScarecrow <136123749+SleepyScarecrow@users.noreply.github.com> Co-authored-by: VMSolidus <evilexecutive@gmail.com>
48 lines
1.2 KiB
C#
48 lines
1.2 KiB
C#
using Content.Shared.Medical;
|
|
using JetBrains.Annotations;
|
|
using Robust.Client.GameObjects;
|
|
|
|
namespace Content.Client.Eye.PenLight.UI
|
|
{
|
|
[UsedImplicitly]
|
|
public sealed class PenLightBoundUserInterface : BoundUserInterface
|
|
{
|
|
[ViewVariables]
|
|
private PenLightWindow? _window;
|
|
|
|
public PenLightBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) { }
|
|
|
|
protected override void Open()
|
|
{
|
|
base.Open();
|
|
_window = new PenLightWindow
|
|
{
|
|
Title = EntMan.GetComponent<MetaDataComponent>(Owner).EntityName,
|
|
};
|
|
_window.OnClose += Close;
|
|
_window.OpenCentered();
|
|
}
|
|
|
|
protected override void ReceiveMessage(BoundUserInterfaceMessage message)
|
|
{
|
|
if (_window == null
|
|
|| message is not PenLightUserMessage cast)
|
|
return;
|
|
|
|
_window.Diagnose(cast);
|
|
}
|
|
|
|
protected override void Dispose(bool disposing)
|
|
{
|
|
base.Dispose(disposing);
|
|
if (!disposing)
|
|
return;
|
|
|
|
if (_window != null)
|
|
_window.OnClose -= Close;
|
|
|
|
_window?.Dispose();
|
|
}
|
|
}
|
|
}
|