Skip to content

Commit

Permalink
Storage fixes
Browse files Browse the repository at this point in the history
Yada yada.
  • Loading branch information
metalgearsloth committed Feb 4, 2025
1 parent 87fa6a3 commit 372b581
Show file tree
Hide file tree
Showing 6 changed files with 143 additions and 46 deletions.
3 changes: 1 addition & 2 deletions Content.Client/PDA/PdaBoundUserInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ protected override void Open()

private void CreateMenu()
{
_menu = this.CreateWindow<PdaMenu>();
_menu.OpenCenteredLeft();
_menu = this.CreateWindowCenteredLeft<PdaMenu>();

Check failure on line 33 in Content.Client/PDA/PdaBoundUserInterface.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

'PdaBoundUserInterface' does not contain a definition for 'CreateWindowCenteredLeft' and no accessible extension method 'CreateWindowCenteredLeft' accepting a first argument of type 'PdaBoundUserInterface' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 33 in Content.Client/PDA/PdaBoundUserInterface.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

'PdaBoundUserInterface' does not contain a definition for 'CreateWindowCenteredLeft' and no accessible extension method 'CreateWindowCenteredLeft' accepting a first argument of type 'PdaBoundUserInterface' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 33 in Content.Client/PDA/PdaBoundUserInterface.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

'PdaBoundUserInterface' does not contain a definition for 'CreateWindowCenteredLeft' and no accessible extension method 'CreateWindowCenteredLeft' accepting a first argument of type 'PdaBoundUserInterface' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 33 in Content.Client/PDA/PdaBoundUserInterface.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

'PdaBoundUserInterface' does not contain a definition for 'CreateWindowCenteredLeft' and no accessible extension method 'CreateWindowCenteredLeft' accepting a first argument of type 'PdaBoundUserInterface' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 33 in Content.Client/PDA/PdaBoundUserInterface.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

'PdaBoundUserInterface' does not contain a definition for 'CreateWindowCenteredLeft' and no accessible extension method 'CreateWindowCenteredLeft' accepting a first argument of type 'PdaBoundUserInterface' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 33 in Content.Client/PDA/PdaBoundUserInterface.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

'PdaBoundUserInterface' does not contain a definition for 'CreateWindowCenteredLeft' and no accessible extension method 'CreateWindowCenteredLeft' accepting a first argument of type 'PdaBoundUserInterface' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 33 in Content.Client/PDA/PdaBoundUserInterface.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

'PdaBoundUserInterface' does not contain a definition for 'CreateWindowCenteredLeft' and no accessible extension method 'CreateWindowCenteredLeft' accepting a first argument of type 'PdaBoundUserInterface' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 33 in Content.Client/PDA/PdaBoundUserInterface.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

'PdaBoundUserInterface' does not contain a definition for 'CreateWindowCenteredLeft' and no accessible extension method 'CreateWindowCenteredLeft' accepting a first argument of type 'PdaBoundUserInterface' could be found (are you missing a using directive or an assembly reference?)

_menu.FlashLightToggleButton.OnToggled += _ =>
{
Expand Down
28 changes: 26 additions & 2 deletions Content.Client/Storage/StorageBoundUserInterface.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
using System.Numerics;
using Content.Client.UserInterface.Systems.Storage;
using Content.Client.UserInterface.Systems.Storage.Controls;
using Content.Shared.Storage;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;

namespace Content.Client.Storage;

Expand All @@ -11,6 +14,8 @@ public sealed class StorageBoundUserInterface : BoundUserInterface
{
private StorageWindow? _window;

public Vector2? Position => _window?.Position;

public StorageBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
{
}
Expand All @@ -21,7 +26,7 @@ protected override void Open()

_window = IoCManager.Resolve<IUserInterfaceManager>()
.GetUIController<StorageUIController>()
.CreateStorageWindow(Owner);
.CreateStorageWindow(this);

if (EntMan.TryGetComponent(Owner, out StorageComponent? storage))
{
Expand Down Expand Up @@ -50,10 +55,20 @@ public void Reclaim()
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);

Reclaim();
}

public void CloseWindow(Vector2 position)
{
if (_window == null)
return;

// Update its position before potentially saving.
// Listen it makes sense okay.
LayoutContainer.SetPosition(_window, position);
_window?.Close();
}

public void Hide()
{
if (_window == null)
Expand All @@ -70,6 +85,15 @@ public void Show()
_window.Visible = true;
}

public void Show(Vector2 position)
{
if (_window == null)
return;

Show();
LayoutContainer.SetPosition(_window, position);
}

public void ReOpen()
{
_window?.Orphan();
Expand Down
36 changes: 32 additions & 4 deletions Content.Client/Storage/Systems/StorageSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ public sealed class StorageSystem : SharedStorageSystem

private Dictionary<EntityUid, ItemStorageLocation> _oldStoredItems = new();

private List<(StorageBoundUserInterface Bui, bool Value)> _queuedBuis = new();

public override void Initialize()
{
base.Initialize();
Expand Down Expand Up @@ -72,11 +74,11 @@ private void OnStorageHandleState(EntityUid uid, StorageComponent component, ref
if (NestedStorage && player != null && ContainerSystem.TryGetContainingContainer((uid, null, null), out var container) &&
UI.TryGetOpenUi<StorageBoundUserInterface>(container.Owner, StorageComponent.StorageUiKey.Key, out var containerBui))
{
containerBui.Hide();
_queuedBuis.Add((containerBui, false));
}
else
{
storageBui.Show();
_queuedBuis.Add((storageBui, true));
}
}
}
Expand All @@ -93,15 +95,15 @@ protected override void HideStorageWindow(EntityUid uid, EntityUid actor)
{
if (UI.TryGetOpenUi<StorageBoundUserInterface>(uid, StorageComponent.StorageUiKey.Key, out var storageBui))
{
storageBui.Hide();
_queuedBuis.Add((storageBui, false));
}
}

protected override void ShowStorageWindow(EntityUid uid, EntityUid actor)
{
if (UI.TryGetOpenUi<StorageBoundUserInterface>(uid, StorageComponent.StorageUiKey.Key, out var storageBui))
{
storageBui.Show();
_queuedBuis.Add((storageBui, true));
}
}

Expand Down Expand Up @@ -156,4 +158,30 @@ public void HandleAnimatingInsertingEntities(AnimateInsertingEntitiesEvent msg)
}
}
}

public override void Update(float frameTime)
{
base.Update(frameTime);

if (!_timing.IsFirstTimePredicted)
{
return;
}

// This update loop exists just to synchronize with UISystem and avoid 1-tick delays.
// If deferred opens / closes ever get removed you can dump this.
foreach (var (bui, open) in _queuedBuis)
{
if (open)
{
bui.Show();
}
else
{
bui.Hide();
}
}

_queuedBuis.Clear();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using Content.Shared.Input;
using Content.Shared.Item;
using Content.Shared.Storage;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
Expand Down Expand Up @@ -190,6 +191,26 @@ public void UpdateContainer(Entity<StorageComponent>? entity)
BuildGridRepresentation();
}

private void CloseParent()
{
if (StorageEntity == null)
return;

var containerSystem = _entity.System<SharedContainerSystem>();
var uiSystem = _entity.System<UserInterfaceSystem>();

if (containerSystem.TryGetContainingContainer(StorageEntity.Value, out var container) &&
_entity.TryGetComponent(container.Owner, out StorageComponent? storage) &&
storage.Container.Contains(StorageEntity.Value) &&
uiSystem
.TryGetOpenUi<StorageBoundUserInterface>(container.Owner,
StorageComponent.StorageUiKey.Key,
out var parentBui))
{
parentBui.CloseWindow(Position);
}
}

private void BuildGridRepresentation()
{
if (!_entity.TryGetComponent<StorageComponent>(StorageEntity, out var comp) || comp.Grid.Count == 0)
Expand All @@ -212,14 +233,17 @@ private void BuildGridRepresentation()
};
exitButton.OnPressed += _ =>
{
// Close ourselves and all parent BUIs.
Close();
CloseParent();
};
exitButton.OnKeyBindDown += args =>
{
// it just makes sense...
if (!args.Handled && args.Function == ContentKeyFunctions.ActivateItemInWorld)
{
Close();
CloseParent();
args.Handle();
}
};
Expand Down Expand Up @@ -258,7 +282,8 @@ private void BuildGridRepresentation()
var containerSystem = _entity.System<SharedContainerSystem>();

if (containerSystem.TryGetContainingContainer(StorageEntity.Value, out var container) &&
_entity.TryGetComponent(container.Owner, out StorageComponent? storage))
_entity.TryGetComponent(container.Owner, out StorageComponent? storage) &&
storage.Container.Contains(StorageEntity.Value))
{
Close();

Expand All @@ -267,7 +292,7 @@ private void BuildGridRepresentation()
StorageComponent.StorageUiKey.Key,
out var parentBui))
{
parentBui.Show();
parentBui.Show(Position);
}
}
};
Expand Down Expand Up @@ -412,6 +437,8 @@ public void BuildItemPieces()
{
if (storageComp.StoredItems.TryGetValue(ent, out var updated))
{
data.Control.Marked = IsMarked(ent);

if (data.Loc.Equals(updated))
{
DebugTools.Assert(data.Control.Location == updated);
Expand Down Expand Up @@ -450,12 +477,7 @@ public void BuildItemPieces()
var gridPiece = new ItemGridPiece((ent, itemEntComponent), loc, _entity)
{
MinSize = size,
Marked = _contained.IndexOf(ent) switch
{
0 => ItemGridPieceMarks.First,
1 => ItemGridPieceMarks.Second,
_ => null,
}
Marked = IsMarked(ent),
};
gridPiece.OnPiecePressed += OnPiecePressed;
gridPiece.OnPieceUnpressed += OnPieceUnpressed;
Expand All @@ -467,6 +489,16 @@ public void BuildItemPieces()
}
}

private ItemGridPieceMarks? IsMarked(EntityUid uid)
{
return _contained.IndexOf(uid) switch
{
0 => ItemGridPieceMarks.First,
1 => ItemGridPieceMarks.Second,
_ => null,
};
}

protected override void FrameUpdate(FrameEventArgs args)
{
base.FrameUpdate(args);
Expand All @@ -486,8 +518,9 @@ protected override void FrameUpdate(FrameEventArgs args)
{
if (StorageEntity != null && _entity.System<StorageSystem>().NestedStorage)
{
// If parent container nests us then show back button
if (containerSystem.TryGetContainingContainer(StorageEntity.Value, out var container) &&
_entity.HasComponent<StorageComponent>(container.Owner))
_entity.TryGetComponent(container.Owner, out StorageComponent? storageComp) && storageComp.Container.Contains(StorageEntity.Value))
{
_backButton.Visible = true;
}
Expand Down
28 changes: 18 additions & 10 deletions Content.Client/UserInterface/Systems/Storage/StorageUIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using Content.Shared.Input;
using Content.Shared.Interaction;
using Content.Shared.Storage;
using Robust.Client.GameObjects;
using Robust.Client.Input;
using Robust.Client.Player;
using Robust.Client.UserInterface;
Expand All @@ -37,11 +38,7 @@ public sealed class StorageUIController : UIController, IOnSystemChanged<Storage
[Dependency] private readonly IInputManager _input = default!;
[Dependency] private readonly IPlayerManager _player = default!;
[UISystemDependency] private readonly StorageSystem _storage = default!;

/// <summary>
/// Cached positions for opening nested storage.
/// </summary>
private readonly Dictionary<EntityUid, Vector2> _reservedStorage = new();
[UISystemDependency] private readonly UserInterfaceSystem _ui = default!;

private readonly DragDropHelper<ItemGridPiece> _menuDragHelper;

Expand Down Expand Up @@ -112,7 +109,7 @@ private void OnStaticStorageChanged(bool obj)
StaticStorageUIEnabled = obj;
}

public StorageWindow CreateStorageWindow(EntityUid uid)
public StorageWindow CreateStorageWindow(StorageBoundUserInterface sBui)
{
var window = new StorageWindow();
window.MouseFilter = Control.MouseFilterMode.Pass;
Expand All @@ -132,14 +129,25 @@ public StorageWindow CreateStorageWindow(EntityUid uid)
}
else
{
window.OpenCenteredLeft();

if (_reservedStorage.Remove(uid, out var pos))
// Open at parent position if it's open.
if (_ui.TryGetOpenUi<StorageBoundUserInterface>(EntityManager.GetComponent<TransformComponent>(sBui.Owner).ParentUid,
StorageComponent.StorageUiKey.Key, out var bui) && bui.Position != null)
{
window.Open(bui.Position.Value);

Check failure on line 136 in Content.Client/UserInterface/Systems/Storage/StorageUIController.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

No overload for method 'Open' takes 1 arguments

Check failure on line 136 in Content.Client/UserInterface/Systems/Storage/StorageUIController.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

No overload for method 'Open' takes 1 arguments

Check failure on line 136 in Content.Client/UserInterface/Systems/Storage/StorageUIController.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

No overload for method 'Open' takes 1 arguments

Check failure on line 136 in Content.Client/UserInterface/Systems/Storage/StorageUIController.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

No overload for method 'Open' takes 1 arguments

Check failure on line 136 in Content.Client/UserInterface/Systems/Storage/StorageUIController.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

No overload for method 'Open' takes 1 arguments

Check failure on line 136 in Content.Client/UserInterface/Systems/Storage/StorageUIController.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

No overload for method 'Open' takes 1 arguments

Check failure on line 136 in Content.Client/UserInterface/Systems/Storage/StorageUIController.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

No overload for method 'Open' takes 1 arguments

Check failure on line 136 in Content.Client/UserInterface/Systems/Storage/StorageUIController.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

No overload for method 'Open' takes 1 arguments
}
// Open at the saved position if it exists.
else if (_ui.TryGetPosition(sBui.Owner, StorageComponent.StorageUiKey.Key, out var pos))

Check failure on line 139 in Content.Client/UserInterface/Systems/Storage/StorageUIController.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

'UserInterfaceSystem' does not contain a definition for 'TryGetPosition' and no accessible extension method 'TryGetPosition' accepting a first argument of type 'UserInterfaceSystem' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 139 in Content.Client/UserInterface/Systems/Storage/StorageUIController.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

'UserInterfaceSystem' does not contain a definition for 'TryGetPosition' and no accessible extension method 'TryGetPosition' accepting a first argument of type 'UserInterfaceSystem' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 139 in Content.Client/UserInterface/Systems/Storage/StorageUIController.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

'UserInterfaceSystem' does not contain a definition for 'TryGetPosition' and no accessible extension method 'TryGetPosition' accepting a first argument of type 'UserInterfaceSystem' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 139 in Content.Client/UserInterface/Systems/Storage/StorageUIController.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

'UserInterfaceSystem' does not contain a definition for 'TryGetPosition' and no accessible extension method 'TryGetPosition' accepting a first argument of type 'UserInterfaceSystem' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 139 in Content.Client/UserInterface/Systems/Storage/StorageUIController.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

'UserInterfaceSystem' does not contain a definition for 'TryGetPosition' and no accessible extension method 'TryGetPosition' accepting a first argument of type 'UserInterfaceSystem' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 139 in Content.Client/UserInterface/Systems/Storage/StorageUIController.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

'UserInterfaceSystem' does not contain a definition for 'TryGetPosition' and no accessible extension method 'TryGetPosition' accepting a first argument of type 'UserInterfaceSystem' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 139 in Content.Client/UserInterface/Systems/Storage/StorageUIController.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

'UserInterfaceSystem' does not contain a definition for 'TryGetPosition' and no accessible extension method 'TryGetPosition' accepting a first argument of type 'UserInterfaceSystem' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 139 in Content.Client/UserInterface/Systems/Storage/StorageUIController.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

'UserInterfaceSystem' does not contain a definition for 'TryGetPosition' and no accessible extension method 'TryGetPosition' accepting a first argument of type 'UserInterfaceSystem' could be found (are you missing a using directive or an assembly reference?)
{
window.Open(pos);
}
// Open at the default position.
else
{
LayoutContainer.SetPosition(window, pos);
window.OpenCenteredLeft();
}
}

_ui.RegisterControl(sBui, window);

Check failure on line 150 in Content.Client/UserInterface/Systems/Storage/StorageUIController.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

'UserInterfaceSystem' does not contain a definition for 'RegisterControl' and no accessible extension method 'RegisterControl' accepting a first argument of type 'UserInterfaceSystem' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 150 in Content.Client/UserInterface/Systems/Storage/StorageUIController.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

'UserInterfaceSystem' does not contain a definition for 'RegisterControl' and no accessible extension method 'RegisterControl' accepting a first argument of type 'UserInterfaceSystem' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 150 in Content.Client/UserInterface/Systems/Storage/StorageUIController.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

'UserInterfaceSystem' does not contain a definition for 'RegisterControl' and no accessible extension method 'RegisterControl' accepting a first argument of type 'UserInterfaceSystem' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 150 in Content.Client/UserInterface/Systems/Storage/StorageUIController.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

'UserInterfaceSystem' does not contain a definition for 'RegisterControl' and no accessible extension method 'RegisterControl' accepting a first argument of type 'UserInterfaceSystem' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 150 in Content.Client/UserInterface/Systems/Storage/StorageUIController.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

'UserInterfaceSystem' does not contain a definition for 'RegisterControl' and no accessible extension method 'RegisterControl' accepting a first argument of type 'UserInterfaceSystem' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 150 in Content.Client/UserInterface/Systems/Storage/StorageUIController.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

'UserInterfaceSystem' does not contain a definition for 'RegisterControl' and no accessible extension method 'RegisterControl' accepting a first argument of type 'UserInterfaceSystem' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 150 in Content.Client/UserInterface/Systems/Storage/StorageUIController.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

'UserInterfaceSystem' does not contain a definition for 'RegisterControl' and no accessible extension method 'RegisterControl' accepting a first argument of type 'UserInterfaceSystem' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 150 in Content.Client/UserInterface/Systems/Storage/StorageUIController.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

'UserInterfaceSystem' does not contain a definition for 'RegisterControl' and no accessible extension method 'RegisterControl' accepting a first argument of type 'UserInterfaceSystem' could be found (are you missing a using directive or an assembly reference?)
return window;
}

Expand Down
43 changes: 24 additions & 19 deletions Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -318,11 +318,33 @@ private void AddUiVerb(EntityUid uid, StorageComponent component, GetVerbsEvent<
args.Verbs.Add(verb);
}

public void OpenStorageUI(EntityUid uid, EntityUid actor, StorageComponent? storageComp = null, bool silent = true)
{
// Handle recursively opening nested storages.
if (ContainerSystem.TryGetContainingContainer((uid, null, null), out var container) &&
UI.IsUiOpen(container.Owner, StorageComponent.StorageUiKey.Key, actor))
{
_nestedCheck = true;
HideStorageWindow(container.Owner, actor);
OpenStorageUIInternal(uid, actor, storageComp, silent: true);
_nestedCheck = false;
}
else
{
// If you need something more sophisticated for multi-UI you'll need to code some smarter
// interactions.
if (_openStorageLimit == 1)
UI.CloseUserUis<StorageComponent.StorageUiKey>(actor);

OpenStorageUIInternal(uid, actor, storageComp, silent: false);
}
}

/// <summary>
/// Opens the storage UI for an entity
/// </summary>
/// <param name="entity">The entity to open the UI for</param>
public void OpenStorageUI(EntityUid uid, EntityUid entity, StorageComponent? storageComp = null, bool silent = true)
private void OpenStorageUIInternal(EntityUid uid, EntityUid entity, StorageComponent? storageComp = null, bool silent = true)
{
if (!Resolve(uid, ref storageComp, false))
return;
Expand Down Expand Up @@ -407,24 +429,7 @@ private void OnActivate(EntityUid uid, StorageComponent storageComp, ActivateInW
}
else
{
// Handle recursively opening nested storages.
if (ContainerSystem.TryGetContainingContainer((args.Target, null, null), out var container) &&
UI.IsUiOpen(container.Owner, StorageComponent.StorageUiKey.Key, args.User))
{
_nestedCheck = true;
HideStorageWindow(container.Owner, args.User);
OpenStorageUI(uid, args.User, storageComp, silent: true);
_nestedCheck = false;
}
else
{
// If you need something more sophisticated for multi-UI you'll need to code some smarter
// interactions.
if (_openStorageLimit == 1)
UI.CloseUserUis<StorageComponent.StorageUiKey>(args.User);

OpenStorageUI(uid, args.User, storageComp, silent: false);
}
OpenStorageUI(uid, args.User, storageComp);
}

args.Handled = true;
Expand Down

0 comments on commit 372b581

Please sign in to comment.