mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-30 08:07:28 +00:00
* Revert `Storage UI V2` Storage UI v2 has been a buggy and infuriating mess to use. This idea needs additional polish before it is ready. I think we should go ahead and remove it until that point, to alleviate further aggrevation. Signed-off-by: Michael Shaw <michaelsshaw44@gmail.com> * storage: remove unused cvars --------- Signed-off-by: Michael Shaw <michaelsshaw44@gmail.com>
38 lines
934 B
C#
38 lines
934 B
C#
using Content.Client.Storage.Systems;
|
|
using Content.Shared.Storage;
|
|
using JetBrains.Annotations;
|
|
|
|
namespace Content.Client.Storage;
|
|
|
|
[UsedImplicitly]
|
|
public sealed class StorageBoundUserInterface : BoundUserInterface
|
|
{
|
|
[Dependency] private readonly IEntityManager _entManager = default!;
|
|
|
|
private readonly StorageSystem _storage;
|
|
|
|
public StorageBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
|
|
{
|
|
IoCManager.InjectDependencies(this);
|
|
_storage = _entManager.System<StorageSystem>();
|
|
}
|
|
|
|
protected override void Open()
|
|
{
|
|
base.Open();
|
|
|
|
if (_entManager.TryGetComponent<StorageComponent>(Owner, out var comp))
|
|
_storage.OpenStorageWindow((Owner, comp));
|
|
}
|
|
|
|
protected override void Dispose(bool disposing)
|
|
{
|
|
base.Dispose(disposing);
|
|
if (!disposing)
|
|
return;
|
|
|
|
_storage.CloseStorageWindow(Owner);
|
|
}
|
|
}
|
|
|