Inventory Action Sort
pavlicekdominik opened this issue · 0 comments
pavlicekdominik commented
Class: Sort Items
Inherits: UMounteaInventoryItemAction
Purpose
To define the sorting logic for inventory items based on specified criteria such as category, rarity, quantity, value, and weight.
Properties
bSortByCategory
: Boolean to sort by categorybSortByRarity
: Boolean to sort by raritybSortByQuantity
: Boolean to sort by quantitybSortByValue
: Boolean to sort by valuebSortByWeight
: Boolean to sort by weight
Methods
Function: ExecuteSort
- Inputs: None
- Outputs: None
- Purpose: Contains the logic to sort inventory items based on the specified properties.
Usage
When ProcessAction
is called, it will trigger ExecuteSort
if the associated boolean property is true. The ExecuteSort
function will perform the actual sorting of items based on the defined criteria.
Function ProcessAction() -> void:
If bSortByCategory:
ExecuteSort(byCategory)
Else If bSortByRarity:
ExecuteSort(byRarity)
Else If bSortByQuantity:
ExecuteSort(byQuantity)
Else If bSortByValue:
ExecuteSort(byValue)
Else If bSortByWeight:
ExecuteSort(byWeight)
End Function