Compare commits

..

2 Commits

Author SHA1 Message Date
Ji Yoon Rhee
6846c027f1 ^ 2024-06-22 09:55:52 +09:00
Ji Yoon Rhee
037d5442a5 inventory shows collected items, new anim BPs are created and modified for combat system 2024-06-22 09:55:29 +09:00
24 changed files with 96 additions and 35 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,5 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "CraftingInfo.h"

View File

@ -0,0 +1,40 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Engine/DataTable.h"
#include "CraftingInfo.generated.h"
/**
*
*/
USTRUCT(BlueprintType)
struct FCraftingInfo : public FTableRowBase
{
GENERATED_BODY();
public:
//unique ID of item that is being used to create the item
UPROPERTY(EditAnywhere, BlueprintReadWrite)
FName ComponentID;
//unique ID of the item that gets created
UPROPERTY(EditAnywhere, BlueprintReadWrite)
FName ProductID;
//do we want to destroy the component?
UPROPERTY(EditAnywhere, BlueprintReadWrite)
bool bDestroyItemA;
//
UPROPERTY(EditAnywhere, BlueprintReadWrite)
bool bDestroyItemB;
bool operator==(const FCraftingInfo& OtherItem) const {
return ComponentID == OtherItem.ComponentID;
}
};

View File

@ -6,10 +6,11 @@
#include "GameFramework/Actor.h" #include "GameFramework/Actor.h"
#include "Engine/DataTable.h" #include "Engine/DataTable.h"
#include "HYManualPickUp.h" #include "HYManualPickUp.h"
#include "CraftingInfo.h"
#include "InventoryItem.generated.h" #include "InventoryItem.generated.h"
/** /**
* * Represents an item that can be added to player's inventory
*/ */
USTRUCT(BlueprintType) USTRUCT(BlueprintType)
struct FInventoryItem : public FTableRowBase struct FInventoryItem : public FTableRowBase
@ -23,6 +24,7 @@ public:
UPROPERTY(EditAnywhere, BlueprintReadWrite) UPROPERTY(EditAnywhere, BlueprintReadWrite)
FName ItemID; FName ItemID;
//queue of items that are dropped and spawned back into the world
UPROPERTY(EditAnywhere, BlueprintReadWrite) UPROPERTY(EditAnywhere, BlueprintReadWrite)
TSubclassOf<class AHYManualPickUp> ItemPickup; TSubclassOf<class AHYManualPickUp> ItemPickup;
@ -39,13 +41,21 @@ public:
UPROPERTY(EditAnywhere, BlueprintReadWrite) UPROPERTY(EditAnywhere, BlueprintReadWrite)
bool OnlyDropped; bool OnlyDropped;
//can this item be consumed/used?
UPROPERTY(EditAnywhere, BlueprintReadWrite)
bool CanBeUsed;
UPROPERTY(EditAnywhere, BlueprintReadWrite) UPROPERTY(EditAnywhere, BlueprintReadWrite)
UTexture2D* ItemIcon; UTexture2D* ItemIcon;
UPROPERTY(EditAnywhere, BlueprintReadWrite) UPROPERTY(EditAnywhere, BlueprintReadWrite)
FText ItemDescription; FText ItemDescription;
////all the possible crafting combinations for this particular item
UPROPERTY(EditAnywhere, BlueprintReadWrite)
TArray<FCraftingInfo> CraftCombinations;
bool operator==(const FInventoryItem& OtherItem) const { bool operator==(const FInventoryItem& OtherItem) const {
return ItemID == OtherItem.ItemID; return ItemID == OtherItem.ItemID;
} }
}; };