Fix storage UI interactions (#28291)
* Fix storage UI interactions * Add VV support
This commit is contained in:
@@ -9,7 +9,7 @@ using Robust.Client.UserInterface.CustomControls;
|
|||||||
|
|
||||||
namespace Content.Client.UserInterface.Systems.Storage.Controls;
|
namespace Content.Client.UserInterface.Systems.Storage.Controls;
|
||||||
|
|
||||||
public sealed class ItemGridPiece : Control
|
public sealed class ItemGridPiece : Control, IEntityControl
|
||||||
{
|
{
|
||||||
private readonly IEntityManager _entityManager;
|
private readonly IEntityManager _entityManager;
|
||||||
private readonly StorageUIController _storageController;
|
private readonly StorageUIController _storageController;
|
||||||
@@ -287,6 +287,8 @@ public sealed class ItemGridPiece : Control
|
|||||||
var actualSize = new Vector2(boxSize.X + 1, boxSize.Y + 1);
|
var actualSize = new Vector2(boxSize.X + 1, boxSize.Y + 1);
|
||||||
return actualSize * new Vector2i(8, 8);
|
return actualSize * new Vector2i(8, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public EntityUid? UiEntity => Entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum ItemGridPieceMarks
|
public enum ItemGridPieceMarks
|
||||||
|
|||||||
@@ -1167,7 +1167,7 @@ namespace Content.Shared.Interaction
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// we don't check if the user can access the storage entity itself. This should be handed by the UI system.
|
// we don't check if the user can access the storage entity itself. This should be handed by the UI system.
|
||||||
return _ui.IsUiOpen(target, StorageComponent.StorageUiKey.Key, user);
|
return _ui.IsUiOpen(container.Owner, StorageComponent.StorageUiKey.Key, user);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user