mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-18 14:07:53 +03:00
Lots of stuff. Also moved everything I could to the _Shitmed namespace
as I do in Goob. Will make future ports way faster
# Changelog
🆑 Mocho
- add: Added some fun organs and other thingies, check out the Goob PRs
if you want more details.
- fix: Fixed tons of issues with shitmed. Too many for the changelog in
fact.
(cherry picked from commit 3c9db94102cb25b28a83d51ac8d659fa31fe7d12)
41 lines
1.5 KiB
C#
41 lines
1.5 KiB
C#
using Content.Shared._Shitmed.Autodoc;
|
|
using Robust.Client.GameObjects;
|
|
using Robust.Client.Player;
|
|
|
|
namespace Content.Client._Shitmed.Autodoc;
|
|
|
|
public sealed class AutodocBoundUserInterface : BoundUserInterface
|
|
{
|
|
[Dependency] private readonly IEntityManager _entMan = default!;
|
|
[Dependency] private readonly IPlayerManager _player = default!;
|
|
|
|
[ViewVariables]
|
|
private AutodocWindow? _window;
|
|
|
|
public AutodocBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
|
|
{
|
|
_window = new AutodocWindow(owner, _entMan, _player);
|
|
|
|
_window.OnCreateProgram += title => SendMessage(new AutodocCreateProgramMessage(title));
|
|
_window.OnToggleProgramSafety += program => SendMessage(new AutodocToggleProgramSafetyMessage(program));
|
|
_window.OnRemoveProgram += program => SendMessage(new AutodocRemoveProgramMessage(program));
|
|
|
|
_window.OnAddStep += (program, step, index) => SendMessage(new AutodocAddStepMessage(program, step, index));
|
|
_window.OnRemoveStep += (program, stepIndex) => SendMessage(new AutodocRemoveStepMessage(program, stepIndex));
|
|
|
|
_window.OnStart += program => SendMessage(new AutodocStartMessage(program));
|
|
_window.OnStop += () => SendMessage(new AutodocStopMessage());
|
|
|
|
_window.OnClose += () => Close();
|
|
|
|
_window.OpenCentered();
|
|
}
|
|
|
|
protected override void Dispose(bool disposing)
|
|
{
|
|
base.Dispose(disposing);
|
|
if (disposing)
|
|
_window?.Dispose();
|
|
}
|
|
}
|