Methods for filtering (Sorting) an inventory array.

I would like to know what the most famous methods would be, such as Bubble sort and I would like to know how I could filter an array and only show items from the same class next to it and if not, it could be another from another class but of the same type. For example:

Slot 1: Canned beans Slot 2: Canned beans Slot 3: Canned beans Slot: 4 Peanut butter Slot 5: Peanut butter (Because we ran out of Canned beans, so show next item of type food)

And of course, other conditions such as item condition, show those that are less deteriorated first in the queue than the rest.
Capturar

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.