edited March 2024 in ORK Support
Notification -> Bug of "Inventory is full". When the inventory is already full and adding items (directly operated in the editor), it won't trigger the "Inventory is full" notification.

==================




I checked the code myself, and it seems like the issue is here. I made some changes, but there's still a bug. For example, when the current inventory space is 8/10 and I try to add 3 items at once, theoretically, it should trigger the "inventory is full" notification, but it doesn't. Only when I click to add again, will the notification be triggered.


PS:ORK Framework 3 Source Code\Framework\Gameplay\Inventory\Inventory\Inventory.cs

public virtual void CheckQuantity(IShortcut shortcut)
{
if(shortcut != null)
{
int allowed = this.GetAllowedCount(shortcut);


// ===============================
This is what I modified, but there are still issues.
// ===============================
if(allowed <= 0)
{
return;
}
// ===============================
// ===============================



if(shortcut.Quantity > allowed)
{
shortcut.Quantity = allowed;
}
}
}
Post edited by ranwang520 on
  • edited March 2024
    If it is indeed a bug, could you please tell me directly how to fix it? I would be extremely grateful.
    Post edited by ranwang520 on
  • The Inventory Full notification is only displayed when no more items can be added, but if the item collection still adds items and some of them exceed the limit, that'll not display the notification.
    Not really a bug, just how it currently works. I'll look into changes for this.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.