Virtual items cleanup (#23912)
* Virtual items cleanup * Detail * Review --------- Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
@@ -12,6 +12,7 @@ using Content.Client.UserInterface.Systems.Inventory.Windows;
|
||||
using Content.Shared.Containers.ItemSlots;
|
||||
using Content.Shared.Hands.Components;
|
||||
using Content.Shared.Input;
|
||||
using Content.Shared.Inventory.VirtualItem;
|
||||
using Content.Shared.Storage;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.UserInterface;
|
||||
@@ -423,8 +424,17 @@ public sealed class InventoryUIController : UIController, IOnStateEntered<Gamepl
|
||||
if (_slotGroups.GetValueOrDefault(group)?.GetButton(name) is not { } button)
|
||||
return;
|
||||
|
||||
button.SpriteView.SetEntity(entity);
|
||||
button.StorageButton.Visible = showStorage;
|
||||
if (_entities.TryGetComponent(entity, out VirtualItemComponent? virtb))
|
||||
{
|
||||
button.SpriteView.SetEntity(virtb.BlockingEntity);
|
||||
button.Blocked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
button.SpriteView.SetEntity(entity);
|
||||
button.Blocked = false;
|
||||
button.StorageButton.Visible = showStorage;
|
||||
}
|
||||
}
|
||||
|
||||
public bool RegisterSlotGroupContainer(ItemSlotButtonContainer slotContainer)
|
||||
|
||||
Reference in New Issue
Block a user