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 #165

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

Inventory Action #165

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

Comments

@pavlicekdominik
Copy link
Member

Class: UMounteaInventoryItemAction

Inherits: UObject

Attributes:

  • Abstract: Indicates that this class is meant to be a base class and should not be instantiated directly.
  • Blueprintable and BlueprintType: Allows the class to be used within Blueprints.
  • EditInlineNew: Enables creating new instances of this class in the editor inline with the property that's referencing it.

Purpose:

The UMounteaInventoryItemAction class provides a common interface and functionalities for inventory item actions such as displaying the action, processing the action, and setting the action context.

Properties:

  • ActionTag: A FGameplayTag used to uniquely identify or categorize the action.
  • ActionName: A FName used for a more human-readable identification of the action.
  • ActionIcon: A pointer to a UTexture2D that represents the action's icon.
  • OwningItem: A pointer to the UMounteaInventoryItemBase that owns or is associated with this action.

Methods:

Function: InitializeAction

  • Purpose:
    To set up the action with a specific item and context.
  • Inputs:
    • UMounteaInventoryItemBase* ItemInFocus: The inventory item that is the focus of this action.
    • FMounteaDynamicDelegateContext Context: The context in which the action is being initialized.

Function: DisplayAction

  • Purpose:
    To determine if the action should be displayed to the user.
  • Returns:
    • bool - True if the action should be displayed, False otherwise.

Function: ProcessAction

  • Purpose:
    This function is meant to be implemented in Blueprints to define what happens when the action is processed.

Function: SetWorldFromLevel

  • Purpose:
    To set the World property based on the given level.

Function: SetWorld

  • Purpose:
    To directly set the World property.

Function: CopyFromOther

  • Purpose:
    To copy properties from another instance of UMounteaInventoryItemAction.

Struct: FMounteaItemAction

  • Purpose:
    To wrap UMounteaInventoryItemAction for use in more complex data structures, with comparison operators and a hashing function.

Hashing

Function GetTypeHash(Action: FMounteaItemAction) -> uint32:

   Return HashFromPointer(FMounteaItemAction.Actoin)

End Function
@pavlicekdominik pavlicekdominik self-assigned this Nov 6, 2023
@pavlicekdominik pavlicekdominik added this to the 1.0.0.X milestone Nov 6, 2023
pavlicekdominik added a commit that referenced this issue Nov 18, 2023
Refactoring Inventory Component ( #98 ), Inventory Action ( #165 ) and Inventory Item ( #104 ).
pavlicekdominik added a commit that referenced this issue Nov 18, 2023
Refactoring Inventory Action ( #165 ) and Inventory Item ( #104 ).
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