make filled inventory slots blank (#27150)

* blank filled slots

* Update InventoryTemplatePrototype.cs
This commit is contained in:
Nemanja
2024-04-19 23:17:29 -04:00
committed by GitHub
parent ef7f0b8322
commit e5a5196b1f
18 changed files with 73 additions and 13 deletions

View File

@@ -120,12 +120,12 @@ public sealed class HandsUIController : UIController, IOnStateEntered<GameplaySt
if (_entities.TryGetComponent(hand.HeldEntity, out VirtualItemComponent? virt))
{
handButton.SpriteView.SetEntity(virt.BlockingEntity);
handButton.SetEntity(virt.BlockingEntity);
handButton.Blocked = true;
}
else
{
handButton.SpriteView.SetEntity(hand.HeldEntity);
handButton.SetEntity(hand.HeldEntity);
handButton.Blocked = false;
}
}
@@ -171,12 +171,12 @@ public sealed class HandsUIController : UIController, IOnStateEntered<GameplaySt
if (_entities.TryGetComponent(entity, out VirtualItemComponent? virt))
{
hand.SpriteView.SetEntity(virt.BlockingEntity);
hand.SetEntity(virt.BlockingEntity);
hand.Blocked = true;
}
else
{
hand.SpriteView.SetEntity(entity);
hand.SetEntity(entity);
hand.Blocked = false;
}
@@ -190,7 +190,7 @@ public sealed class HandsUIController : UIController, IOnStateEntered<GameplaySt
if (hand == null)
return;
hand.SpriteView.SetEntity(null);
hand.SetEntity(null);
if (_playerHandsComponent?.ActiveHand?.Name == name)
HandsGui?.UpdatePanelEntity(null);
}

View File

@@ -417,7 +417,7 @@ public sealed class InventoryUIController : UIController, IOnStateEntered<Gamepl
if (_strippingWindow?.InventoryButtons.GetButton(update.Name) is { } inventoryButton)
{
inventoryButton.SpriteView.SetEntity(entity);
inventoryButton.SetEntity(entity);
inventoryButton.StorageButton.Visible = showStorage;
}
@@ -426,12 +426,12 @@ public sealed class InventoryUIController : UIController, IOnStateEntered<Gamepl
if (_entities.TryGetComponent(entity, out VirtualItemComponent? virtb))
{
button.SpriteView.SetEntity(virtb.BlockingEntity);
button.SetEntity(virtb.BlockingEntity);
button.Blocked = true;
}
else
{
button.SpriteView.SetEntity(entity);
button.SetEntity(entity);
button.Blocked = false;
button.StorageButton.Visible = showStorage;
}