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

FEquipmentItemSlot #143

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

FEquipmentItemSlot #143

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

Comments

@pavlicekdominik
Copy link
Member

FEquipmentItemSlot

Properties:

ItemSlot:

  • Type: FInventoryItemSlot
  • Description: The item that is currently in this equipment slot.

SlotName:

  • Type: FName
  • Description: A unique name for each equipment slot, ensuring distinctness and used for UI identification.

SlotGuid:

  • Type: FGuid
  • Description: A unique identifier for each equipment slot, ensuring distinctness.

AcceptedTags:

  • Type: FGameplayTagsContainer
  • Description: A list of tags that identify what kind of items can be placed in this slot. For instance, a "Head" slot might accept items with tags like "Helmet," "Hat," etc.

AcceptedCategories:

  • Type: TArray<UInventoryItemCategory*>
  • Description: Similarly, a list of categories that the equipment slot will accept. For instance, the same "Head" slot might accept categories like "Armor" or "Clothing."

Usage and Logic Integration:

  • Initialization:

    • When creating an FEquipmentItemSlot, you'd specify the accepted tags and categories to dictate what it can hold. The SlotGuid would ideally be generated upon creation to ensure uniqueness.
  • Checking If An Item Can Be Equipped:

    • When trying to equip an item into an FEquipmentItemSlot, you'd first check if the item's tags or category match with the AcceptedTags or AcceptedCategories of the equipment slot.
  • Storing an Item:

    • Once deemed appropriate, the item can be stored in the slot by filling out the ItemSlot property.
  • Querying:

    • If you need to look up an equipment slot (e.g., for a UI display), you can search for it by its unique SlotGuid.
  • Removing or Replacing an Item:

    • You can simply set a new item to the ItemSlot or clear it to remove the item. When replacing, you should also ensure that the item being replaced is either discarded, destroyed, or returned to the inventory, depending on the desired game behavior.
@pavlicekdominik pavlicekdominik self-assigned this Nov 1, 2023
@pavlicekdominik pavlicekdominik added this to the 1.0.0.X milestone Nov 1, 2023
pavlicekdominik added a commit that referenced this issue Nov 26, 2023
Completely changing Equipment Interface ( #142 ) and Equipment Component ( #142 ).
Created new Equipment Slot ( #143 ) and helpers ( #146, #147 ).
pavlicekdominik added a commit that referenced this issue Nov 27, 2023
Completely changing Equipment Interface ( #142 ) and Equipment Component ( #142 ).
Created new Equipment Slot ( #143 ) and helpers ( #146, #147 ).
pavlicekdominik added a commit that referenced this issue Nov 27, 2023
Completely changing Equipment Interface ( #142 ) and Equipment Component ( #142 ).
Created new Equipment Slot ( #143 ) and helpers ( #146, #147 ).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In progress
Development

No branches or pull requests

1 participant