From edbc7612f0e82cc87ae7b36af42cea0a67cee27d Mon Sep 17 00:00:00 2001 From: Mikhail Date: Wed, 18 Feb 2026 00:28:43 -0500 Subject: [PATCH 1/3] Add icon when holding shift Indicates ability to place item in storage --- StoragePlayer.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/StoragePlayer.cs b/StoragePlayer.cs index fa04357d..d6b7bfbf 100644 --- a/StoragePlayer.cs +++ b/StoragePlayer.cs @@ -328,6 +328,22 @@ public override bool ShiftClickSlot(Item[] inventory, int context, int slot) return true; } + public override bool HoverSlot(Item[] inventory, int context, int slot) + { + if (storageAccess.X < 0 || storageAccess.Y < 0) + return false; + + Item item = inventory[slot]; + + if (item.favorited || item.IsAir) + return false; + + if (ItemSlot.ShiftInUse) + Main.cursorOverride = 9; + + return base.HoverSlot(inventory, context, slot); + } + public TEStorageComponent GetStorageComponent() { if (storageAccess.X < 0 || storageAccess.Y < 0) return null; From 2c53df0425407b4b02fdbef3025d2479bb1ab733 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Wed, 18 Feb 2026 10:45:56 -0500 Subject: [PATCH 2/3] Icon fixes No longer displays if pressing shift-click would do nothing Displays correctly for magic storage --- StoragePlayer.cs | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/StoragePlayer.cs b/StoragePlayer.cs index d6b7bfbf..35564166 100644 --- a/StoragePlayer.cs +++ b/StoragePlayer.cs @@ -330,14 +330,39 @@ public override bool ShiftClickSlot(Item[] inventory, int context, int slot) public override bool HoverSlot(Item[] inventory, int context, int slot) { - if (storageAccess.X < 0 || storageAccess.Y < 0) + if (context != ItemSlot.Context.InventoryItem && context != ItemSlot.Context.InventoryCoin && context != ItemSlot.Context.InventoryAmmo) return false; - + if (storageAccess.X < 0 || storageAccess.Y < 0) + return base.HoverSlot(inventory, context, slot); Item item = inventory[slot]; - if (item.favorited || item.IsAir) return false; + if (Player.inventory[slot] == inventory[slot]) + { + bool pass = false; + using (SecuritySystem.CreateAccessContext()) + { + foreach (TEAbstractStorageUnit storageUnit in GetStorageHeart().GetStorageUnits()) + { + if (!storageUnit.IsFull || storageUnit.HasSpaceInStackFor(item)) + { + pass = true; + } + } + } + + if (pass == false) + return false; + } + else if (Player.inventory[slot] != inventory[slot]) + { + if (!Player.CanAcceptItemIntoInventory(item)) + { + return false; + } + } + if (ItemSlot.ShiftInUse) Main.cursorOverride = 9; From 6444d04f0405bce377acde1094c178c7a29492b7 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Wed, 18 Feb 2026 10:48:37 -0500 Subject: [PATCH 3/3] Quick changes Ensure non-blocking --- StoragePlayer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/StoragePlayer.cs b/StoragePlayer.cs index 35564166..8ce0fd68 100644 --- a/StoragePlayer.cs +++ b/StoragePlayer.cs @@ -333,7 +333,7 @@ public override bool HoverSlot(Item[] inventory, int context, int slot) if (context != ItemSlot.Context.InventoryItem && context != ItemSlot.Context.InventoryCoin && context != ItemSlot.Context.InventoryAmmo) return false; if (storageAccess.X < 0 || storageAccess.Y < 0) - return base.HoverSlot(inventory, context, slot); + return false; Item item = inventory[slot]; if (item.favorited || item.IsAir) return false; @@ -366,7 +366,7 @@ public override bool HoverSlot(Item[] inventory, int context, int slot) if (ItemSlot.ShiftInUse) Main.cursorOverride = 9; - return base.HoverSlot(inventory, context, slot); + return false; } public TEStorageComponent GetStorageComponent() {