|
|
|
|
| #pragma once
|
|
|
| #include "Kismet/BlueprintFunctionLibrary.h"
|
|
|
| #include "LyraInventoryItemDefinition.generated.h"
|
|
|
| template <typename T> class TSubclassOf;
|
|
|
| class ULyraInventoryItemInstance;
|
| struct FFrame;
|
|
|
|
|
|
|
|
|
| UCLASS(MinimalAPI, DefaultToInstanced, EditInlineNew, Abstract)
|
| class ULyraInventoryItemFragment : public UObject
|
| {
|
| GENERATED_BODY()
|
|
|
| public:
|
| virtual void OnInstanceCreated(ULyraInventoryItemInstance* Instance) const {}
|
| };
|
|
|
|
|
|
|
| |
| |
|
|
| UCLASS(Blueprintable, Const, Abstract)
|
| class ULyraInventoryItemDefinition : public UObject
|
| {
|
| GENERATED_BODY()
|
|
|
| public:
|
| ULyraInventoryItemDefinition(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get());
|
|
|
| UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category=Display)
|
| FText DisplayName;
|
|
|
| UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category=Display, Instanced)
|
| TArray<TObjectPtr<ULyraInventoryItemFragment>> Fragments;
|
|
|
| public:
|
| const ULyraInventoryItemFragment* FindFragmentByClass(TSubclassOf<ULyraInventoryItemFragment> FragmentClass) const;
|
| };
|
|
|
|
|
| UCLASS()
|
| class ULyraInventoryFunctionLibrary : public UBlueprintFunctionLibrary
|
| {
|
| GENERATED_BODY()
|
|
|
| UFUNCTION(BlueprintCallable, meta=(DeterminesOutputType=FragmentClass))
|
| static const ULyraInventoryItemFragment* FindItemDefinitionFragment(TSubclassOf<ULyraInventoryItemDefinition> ItemDef, TSubclassOf<ULyraInventoryItemFragment> FragmentClass);
|
| };
|
|
|