Technology Disks (#13077)

* clean up a bunch of R&D code

* don't store components

* brug

* speedrun some sloth review

* technology disks

* expand functionality, begin work on printer

* disk printer ui

* file

* fix the rebase

* disk console is finito

* Update DiskConsoleSystem.cs
This commit is contained in:
Nemanja
2022-12-20 17:39:57 -05:00
committed by GitHub
parent 88ed188b42
commit 050e157005
34 changed files with 659 additions and 151 deletions

View File

@@ -0,0 +1,53 @@
using Content.Shared.Lathe;
using Content.Shared.Research;
using Robust.Client.GameObjects;
namespace Content.Client.Research.UI
{
public sealed class DiskConsoleBoundUserInterface : BoundUserInterface
{
private DiskConsoleMenu? _menu;
public DiskConsoleBoundUserInterface(ClientUserInterfaceComponent owner, Enum uiKey) : base(owner, uiKey)
{
}
protected override void Open()
{
base.Open();
_menu = new();
_menu.OnClose += Close;
_menu.OpenCentered();
_menu.OnServerButtonPressed += () =>
{
SendMessage(new LatheServerSelectionMessage());
};
_menu.OnPrintButtonPressed += () =>
{
SendMessage(new DiskConsolePrintDiskMessage());
};
}
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
if (!disposing)
return;
_menu?.Close();
}
protected override void UpdateState(BoundUserInterfaceState state)
{
base.UpdateState(state);
if (state is not DiskConsoleBoundUserInterfaceState msg)
return;
_menu?.Update(msg);
}
}
}