From 90d6e5af17fbb145c53398baa12c0455daa0c3cb Mon Sep 17 00:00:00 2001 From: Ji Yoon Rhee Date: Tue, 26 Dec 2023 23:49:01 +0900 Subject: [PATCH] did some work on the inventory item --- hwanyoung2/Source/hwanyoung2/InventoryItem.h | 30 +++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/hwanyoung2/Source/hwanyoung2/InventoryItem.h b/hwanyoung2/Source/hwanyoung2/InventoryItem.h index e93862db..b96dfb20 100644 --- a/hwanyoung2/Source/hwanyoung2/InventoryItem.h +++ b/hwanyoung2/Source/hwanyoung2/InventoryItem.h @@ -13,7 +13,35 @@ USTRUCT(BlueprintType) struct FInventoryItem : public FTableRowBase { - GENERATED_USTRUCT_BODY(); + GENERATED_BODY(); public: + FInventoryItem(); + + //unique ID for the item + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FName ItemID; + + //name of the item + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FText ItemName; + + //weight of the item + //(this may not be important, depends on how we re-design the inventory) + UPROPERTY(EditAnywhere, BlueprintReadWrite) + int32 ItemWeight; + + //is the item only available through drops? + UPROPERTY(EditAnywhere, BlueprintReadWrite) + bool OnlyDropped; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UTexture2D* ItemIcon; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FText ItemDescription; + + bool operator==(const FInventoryItem& OtherItem) const { + return ItemID == OtherItem.ItemID; + } };