Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inventory Action Sort #166

Open
pavlicekdominik opened this issue Nov 6, 2023 · 0 comments
Open

Inventory Action Sort #166

pavlicekdominik opened this issue Nov 6, 2023 · 0 comments
Assignees
Milestone

Comments

@pavlicekdominik
Copy link
Member

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 category
  • bSortByRarity: Boolean to sort by rarity
  • bSortByQuantity: Boolean to sort by quantity
  • bSortByValue: Boolean to sort by value
  • bSortByWeight: 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
@pavlicekdominik pavlicekdominik self-assigned this Nov 6, 2023
@pavlicekdominik pavlicekdominik added this to the 1.0.0.X milestone Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant