diff --git a/scripts/inventory/UniversalItemContainer.cs b/scripts/inventory/UniversalItemContainer.cs index 4bf48d2..5310c2f 100644 --- a/scripts/inventory/UniversalItemContainer.cs +++ b/scripts/inventory/UniversalItemContainer.cs @@ -169,7 +169,7 @@ public class UniversalItemContainer(int totalCapacity) : IItemContainer { NewItem = item, NewIndex = nextAvailableIndex, - Type = Config.ItemDataChangeEventType.QuantityAdded + Type = Config.ItemDataChangeEventType.Add }); return item.Quantity; } @@ -279,6 +279,18 @@ public class UniversalItemContainer(int totalCapacity) : IItemContainer OldItem = oldItem, Type = Config.ItemDataChangeEventType.Replace }); + if (SupportSelect && index == _selectIndex) + { + oldItem?.HideSelf(); + item.ShowSelf(); + SelectedItemChangeEvent?.Invoke(new SelectedItemChangeEvent + { + NewIndex = index, + OldIndex = index, + NewItem = item, + OldItem = oldItem + }); + } return true; } diff --git a/scripts/map/miniMap/MiniMap.cs b/scripts/map/miniMap/MiniMap.cs index fcf60b7..3d37191 100644 --- a/scripts/map/miniMap/MiniMap.cs +++ b/scripts/map/miniMap/MiniMap.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using ColdMint.scripts.debug; -using ColdMint.scripts.map.dateBean; using ColdMint.scripts.map.events; using ColdMint.scripts.map.preview; using ColdMint.scripts.map.room;